diff options
author | Przemo Firszt <przemo@firszt.eu> | 2012-12-11 03:21:21 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-12 04:39:11 +0400 |
commit | 87a573ada017b40facab87b149fcbb3344eab9e8 (patch) | |
tree | 5f2acbf94d750f45d2f5554ff4a92fbb7312d3d8 /drivers/staging/rtl8712/usb_intf.c | |
parent | 94973b63e1bdcd3e712d9199329c9a2141eb9139 (diff) | |
download | linux-87a573ada017b40facab87b149fcbb3344eab9e8.tar.xz |
rtl8712: replace printk with better solutions
Replace printk with netdev_printk helpers, dev_printk helpers or
pr_err/warn/info if there is no device info available.
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/usb_intf.c')
-rw-r--r-- | drivers/staging/rtl8712/usb_intf.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index a96cd06d69dd..c812d6c7dc31 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -205,9 +205,9 @@ static int r871x_suspend(struct usb_interface *pusb_intf, pm_message_t state) { struct net_device *pnetdev = usb_get_intfdata(pusb_intf); - printk(KERN_INFO "r8712: suspending...\n"); + netdev_info(pnetdev, "Suspending...\n"); if (!pnetdev || !netif_running(pnetdev)) { - printk(KERN_INFO "r8712: unable to suspend\n"); + netdev_info(pnetdev, "Unable to suspend\n"); return 0; } if (pnetdev->netdev_ops->ndo_stop) @@ -221,9 +221,9 @@ static int r871x_resume(struct usb_interface *pusb_intf) { struct net_device *pnetdev = usb_get_intfdata(pusb_intf); - printk(KERN_INFO "r8712: resuming...\n"); + netdev_info(pnetdev, "Resuming...\n"); if (!pnetdev || !netif_running(pnetdev)) { - printk(KERN_INFO "r8712: unable to resume\n"); + netdev_info(pnetdev, "Unable to resume\n"); return 0; } netif_device_attach(pnetdev); @@ -273,12 +273,12 @@ static uint r8712_usb_dvobj_init(struct _adapter *padapter) pdvobjpriv->nr_endpoint = piface_desc->bNumEndpoints; if (pusbd->speed == USB_SPEED_HIGH) { pdvobjpriv->ishighspeed = true; - printk(KERN_INFO "r8712u: USB_SPEED_HIGH with %d endpoints\n", - pdvobjpriv->nr_endpoint); + dev_info(&pusbd->dev, "r8712u: USB_SPEED_HIGH with %d endpoints\n", + pdvobjpriv->nr_endpoint); } else { pdvobjpriv->ishighspeed = false; - printk(KERN_INFO "r8712u: USB_SPEED_LOW with %d endpoints\n", - pdvobjpriv->nr_endpoint); + dev_info(&pusbd->dev, "r8712u: USB_SPEED_LOW with %d endpoints\n", + pdvobjpriv->nr_endpoint); } if ((r8712_alloc_io_queue(padapter)) == _FAIL) status = _FAIL; @@ -423,9 +423,9 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, tmpU1b = r8712_read8(padapter, EE_9346CR);/*CR9346*/ /* To check system boot selection.*/ - printk(KERN_INFO "r8712u: Boot from %s: Autoload %s\n", - (tmpU1b & _9356SEL) ? "EEPROM" : "EFUSE", - (tmpU1b & _EEPROM_EN) ? "OK" : "Failed"); + dev_info(&udev->dev, "r8712u: Boot from %s: Autoload %s\n", + (tmpU1b & _9356SEL) ? "EEPROM" : "EFUSE", + (tmpU1b & _EEPROM_EN) ? "OK" : "Failed"); /* To check autoload success or not.*/ if (tmpU1b & _EEPROM_EN) { @@ -533,8 +533,8 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, RT_CID_DEFAULT; break; } - printk(KERN_INFO "r8712u: CustomerID = 0x%.4x\n", - padapter->eeprompriv.CustomerID); + dev_info(&udev->dev, "r8712u: CustomerID = 0x%.4x\n", + padapter->eeprompriv.CustomerID); /* Led mode */ switch (padapter->eeprompriv.CustomerID) { case RT_CID_DEFAULT: @@ -590,11 +590,9 @@ static int r871xu_drv_init(struct usb_interface *pusb_intf, * address by setting bit 1 of first octet. */ mac[0] &= 0xFE; - printk(KERN_INFO "r8712u: MAC Address from user = " - "%pM\n", mac); + dev_info(&udev->dev, "r8712u: MAC Address from user = %pM\n", mac); } else - printk(KERN_INFO "r8712u: MAC Address from efuse = " - "%pM\n", mac); + dev_info(&udev->dev, "r8712u: MAC Address from efuse = %pM\n", mac); memcpy(pnetdev->dev_addr, mac, ETH_ALEN); } /* step 6. Load the firmware asynchronously */ @@ -661,7 +659,6 @@ static void __exit r8712u_drv_halt(void) { drvpriv.drv_registered = false; usb_deregister(&drvpriv.r871xu_drv); - printk(KERN_INFO "r8712u: Driver unloaded\n"); } module_init(r8712u_drv_entry); |