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 @@ * - proto->start() and stop() are called with spin_lock_irq held. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include <linux/errno.h> #include <linux/hdlc.h> #include <linux/if_arp.h> @@ -130,10 +132,10 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event, goto carrier_exit; if (hdlc->carrier) { - printk(KERN_INFO "%s: Carrier detected\n", dev->name); + netdev_info(dev, "Carrier detected\n"); hdlc_proto_start(dev); } else { - printk(KERN_INFO "%s: Carrier lost\n", dev->name); + netdev_info(dev, "Carrier lost\n"); hdlc_proto_stop(dev); } @@ -165,10 +167,10 @@ int hdlc_open(struct net_device *dev) spin_lock_irq(&hdlc->state_lock); if (hdlc->carrier) { - printk(KERN_INFO "%s: Carrier detected\n", dev->name); + netdev_info(dev, "Carrier detected\n"); hdlc_proto_start(dev); } else - printk(KERN_INFO "%s: No carrier\n", dev->name); + netdev_info(dev, "No carrier\n"); hdlc->open = 1; @@ -281,8 +283,8 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto, if (size) if ((dev_to_hdlc(dev)->state = kmalloc(size, GFP_KERNEL)) == NULL) { - printk(KERN_WARNING "Memory squeeze on" - " hdlc_proto_attach()\n"); + netdev_warn(dev, + "Memory squeeze on hdlc_proto_attach()\n"); module_put(proto->module); return -ENOBUFS; } @@ -363,7 +365,7 @@ static int __init hdlc_module_init(void) { int result; - printk(KERN_INFO "%s\n", version); + pr_info("%s\n", version); if ((result = register_netdevice_notifier(&hdlc_notifier)) != 0) return result; dev_add_pack(&hdlc_packet_type); |