diff options
Diffstat (limited to 'drivers/net/wan/hdlc.c')
-rw-r--r-- | drivers/net/wan/hdlc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wan/hdlc.c b/drivers/net/wan/hdlc.c index 5d4bb615ccce..10cc7df95498 100644 --- a/drivers/net/wan/hdlc.c +++ b/drivers/net/wan/hdlc.c | |||
@@ -22,6 +22,8 @@ | |||
22 | * - proto->start() and stop() are called with spin_lock_irq held. | 22 | * - proto->start() and stop() are called with spin_lock_irq held. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
26 | |||
25 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
26 | #include <linux/hdlc.h> | 28 | #include <linux/hdlc.h> |
27 | #include <linux/if_arp.h> | 29 | #include <linux/if_arp.h> |
@@ -130,10 +132,10 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event, | |||
130 | goto carrier_exit; | 132 | goto carrier_exit; |
131 | 133 | ||
132 | if (hdlc->carrier) { | 134 | if (hdlc->carrier) { |
133 | printk(KERN_INFO "%s: Carrier detected\n", dev->name); | 135 | netdev_info(dev, "Carrier detected\n"); |
134 | hdlc_proto_start(dev); | 136 | hdlc_proto_start(dev); |
135 | } else { | 137 | } else { |
136 | printk(KERN_INFO "%s: Carrier lost\n", dev->name); | 138 | netdev_info(dev, "Carrier lost\n"); |
137 | hdlc_proto_stop(dev); | 139 | hdlc_proto_stop(dev); |
138 | } | 140 | } |
139 | 141 | ||
@@ -165,10 +167,10 @@ int hdlc_open(struct net_device *dev) | |||
165 | spin_lock_irq(&hdlc->state_lock); | 167 | spin_lock_irq(&hdlc->state_lock); |
166 | 168 | ||
167 | if (hdlc->carrier) { | 169 | if (hdlc->carrier) { |
168 | printk(KERN_INFO "%s: Carrier detected\n", dev->name); | 170 | netdev_info(dev, "Carrier detected\n"); |
169 | hdlc_proto_start(dev); | 171 | hdlc_proto_start(dev); |
170 | } else | 172 | } else |
171 | printk(KERN_INFO "%s: No carrier\n", dev->name); | 173 | netdev_info(dev, "No carrier\n"); |
172 | 174 | ||
173 | hdlc->open = 1; | 175 | hdlc->open = 1; |
174 | 176 | ||
@@ -281,8 +283,8 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, | |||
281 | if (size) | 283 | if (size) |
282 | if ((dev_to_hdlc(dev)->state = kmalloc(size, | 284 | if ((dev_to_hdlc(dev)->state = kmalloc(size, |
283 | GFP_KERNEL)) == NULL) { | 285 | GFP_KERNEL)) == NULL) { |
284 | printk(KERN_WARNING "Memory squeeze on" | 286 | netdev_warn(dev, |
285 | " hdlc_proto_attach()\n"); | 287 | "Memory squeeze on hdlc_proto_attach()\n"); |
286 | module_put(proto->module); | 288 | module_put(proto->module); |
287 | return -ENOBUFS; | 289 | return -ENOBUFS; |
288 | } | 290 | } |
@@ -363,7 +365,7 @@ static int __init hdlc_module_init(void) | |||
363 | { | 365 | { |
364 | int result; | 366 | int result; |
365 | 367 | ||
366 | printk(KERN_INFO "%s\n", version); | 368 | pr_info("%s\n", version); |
367 | if ((result = register_netdevice_notifier(&hdlc_notifier)) != 0) | 369 | if ((result = register_netdevice_notifier(&hdlc_notifier)) != 0) |
368 | return result; | 370 | return result; |
369 | dev_add_pack(&hdlc_packet_type); | 371 | dev_add_pack(&hdlc_packet_type); |