Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / net / wan / hdlc.c
index 5d4bb61..10cc7df 100644 (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);