generic_hdlc: Update to current logging forms

Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Joe Perches
2011-06-26 19:01:28 +00:00
committed by David S. Miller
parent 2903dd654d
commit 12a3bfefc8
12 changed files with 186 additions and 211 deletions

View File

@@ -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);