aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wan/hdlc_generic.c24
-rw-r--r--include/linux/hdlc.h2
2 files changed, 3 insertions, 23 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
262static void hdlc_setup(struct net_device *dev) 262void 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
291int 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
311void unregister_hdlc_device(struct net_device *dev) 291void unregister_hdlc_device(struct net_device *dev)
312{ 292{
313 rtnl_lock(); 293 rtnl_lock();
@@ -326,8 +306,8 @@ EXPORT_SYMBOL(hdlc_open);
326EXPORT_SYMBOL(hdlc_close); 306EXPORT_SYMBOL(hdlc_close);
327EXPORT_SYMBOL(hdlc_set_carrier); 307EXPORT_SYMBOL(hdlc_set_carrier);
328EXPORT_SYMBOL(hdlc_ioctl); 308EXPORT_SYMBOL(hdlc_ioctl);
309EXPORT_SYMBOL(hdlc_setup);
329EXPORT_SYMBOL(alloc_hdlcdev); 310EXPORT_SYMBOL(alloc_hdlcdev);
330EXPORT_SYMBOL(register_hdlc_device);
331EXPORT_SYMBOL(unregister_hdlc_device); 311EXPORT_SYMBOL(unregister_hdlc_device);
332 312
333static struct packet_type hdlc_packet_type = { 313static struct packet_type hdlc_packet_type = {
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index df695e9ae327..4513f9e40937 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -188,7 +188,7 @@ int hdlc_x25_ioctl(struct net_device *dev, struct ifreq *ifr);
188int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd); 188int hdlc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
189 189
190/* Must be used by hardware driver on module startup/exit */ 190/* Must be used by hardware driver on module startup/exit */
191int register_hdlc_device(struct net_device *dev); 191#define register_hdlc_device(dev) register_netdev(dev)
192void unregister_hdlc_device(struct net_device *dev); 192void unregister_hdlc_device(struct net_device *dev);
193 193
194struct net_device *alloc_hdlcdev(void *priv); 194struct net_device *alloc_hdlcdev(void *priv);