diff options
author | Krzysztof Halasa <khc@pm.waw.pl> | 2006-06-22 16:20:19 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-06-22 23:32:03 -0400 |
commit | 4a31e348e3ecaf54c50240109ac4574b180f8840 (patch) | |
tree | 319978d90b95c7f1d4bf1fdfc552dc8850f330e7 /drivers | |
parent | aa95abefccc25efea5c8654bc3475e8161319b94 (diff) |
[PATCH] WAN: register_hdlc_device() doesn't need dev_alloc_name()
David Boggs noticed that register_hdlc_device() no longer needs
to call dev_alloc_name() as it's called by register_netdev().
register_hdlc_device() is currently equivalent to register_netdev().
hdlc_setup() is now EXPORTed as per David's request.
Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/hdlc_generic.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c index 46cef8f92133..57f9538b8fb5 100644 --- a/drivers/net/wan/hdlc_generic.c +++ b/drivers/net/wan/hdlc_generic.c | |||
@@ -259,7 +259,7 @@ int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
259 | } | 259 | } |
260 | } | 260 | } |
261 | 261 | ||
262 | static void hdlc_setup(struct net_device *dev) | 262 | void hdlc_setup(struct net_device *dev) |
263 | { | 263 | { |
264 | hdlc_device *hdlc = dev_to_hdlc(dev); | 264 | hdlc_device *hdlc = dev_to_hdlc(dev); |
265 | 265 | ||
@@ -288,26 +288,6 @@ struct net_device *alloc_hdlcdev(void *priv) | |||
288 | return dev; | 288 | return dev; |
289 | } | 289 | } |
290 | 290 | ||
291 | int register_hdlc_device(struct net_device *dev) | ||
292 | { | ||
293 | int result = dev_alloc_name(dev, "hdlc%d"); | ||
294 | if (result < 0) | ||
295 | return result; | ||
296 | |||
297 | result = register_netdev(dev); | ||
298 | if (result != 0) | ||
299 | return -EIO; | ||
300 | |||
301 | #if 0 | ||
302 | if (netif_carrier_ok(dev)) | ||
303 | netif_carrier_off(dev); /* no carrier until DCD goes up */ | ||
304 | #endif | ||
305 | |||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | |||
310 | |||
311 | void unregister_hdlc_device(struct net_device *dev) | 291 | void unregister_hdlc_device(struct net_device *dev) |
312 | { | 292 | { |
313 | rtnl_lock(); | 293 | rtnl_lock(); |
@@ -326,8 +306,8 @@ EXPORT_SYMBOL(hdlc_open); | |||
326 | EXPORT_SYMBOL(hdlc_close); | 306 | EXPORT_SYMBOL(hdlc_close); |
327 | EXPORT_SYMBOL(hdlc_set_carrier); | 307 | EXPORT_SYMBOL(hdlc_set_carrier); |
328 | EXPORT_SYMBOL(hdlc_ioctl); | 308 | EXPORT_SYMBOL(hdlc_ioctl); |
309 | EXPORT_SYMBOL(hdlc_setup); | ||
329 | EXPORT_SYMBOL(alloc_hdlcdev); | 310 | EXPORT_SYMBOL(alloc_hdlcdev); |
330 | EXPORT_SYMBOL(register_hdlc_device); | ||
331 | EXPORT_SYMBOL(unregister_hdlc_device); | 311 | EXPORT_SYMBOL(unregister_hdlc_device); |
332 | 312 | ||
333 | static struct packet_type hdlc_packet_type = { | 313 | static struct packet_type hdlc_packet_type = { |