diff options
author | matt mooney <mfm@muteddisk.com> | 2011-05-19 16:47:32 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-19 16:57:30 -0700 |
commit | 1a4b6f66285785ddccef049e6b45be4e7c7a2189 (patch) | |
tree | fe745a2467162a9ab23ca37ce7872532a69f136d /drivers/staging/usbip/stub_dev.c | |
parent | db60697a086cdf4bbe6deedcefc2ff81e2a9efd2 (diff) | |
download | op-kernel-dev-1a4b6f66285785ddccef049e6b45be4e7c7a2189.zip op-kernel-dev-1a4b6f66285785ddccef049e6b45be4e7c7a2189.tar.gz |
staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_
This switches all of the usbip_u{dbg,err,info} and printk statements to
dev_<level>, if possible, or pr_<level> macros. And removes a few
unnecessary debug statements.
Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/stub_dev.c')
-rw-r--r-- | drivers/staging/usbip/stub_dev.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c index c71d0a3..6e99ec8 100644 --- a/drivers/staging/usbip/stub_dev.c +++ b/drivers/staging/usbip/stub_dev.c @@ -196,7 +196,8 @@ static void stub_shutdown_connection(struct usbip_device *ud) * step 1? */ if (ud->tcp_socket) { - usbip_udbg("shutdown tcp_socket %p\n", ud->tcp_socket); + dev_dbg(&sdev->udev->dev, "shutdown tcp_socket %p\n", + ud->tcp_socket); kernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR); } @@ -244,12 +245,11 @@ static void stub_device_reset(struct usbip_device *ud) struct usb_device *udev = sdev->udev; int ret; - usbip_udbg("device reset"); + dev_dbg(&udev->dev, "device reset"); ret = usb_lock_device_for_reset(udev, sdev->interface); if (ret < 0) { dev_err(&udev->dev, "lock for reset\n"); - spin_lock(&ud->lock); ud->status = SDEV_ST_ERROR; spin_unlock(&ud->lock); @@ -336,7 +336,8 @@ static struct stub_device *stub_device_alloc(struct usb_device *udev, usbip_start_eh(&sdev->ud); - usbip_udbg("register new interface\n"); + dev_dbg(&interface->dev, "register new interface\n"); + return sdev; } @@ -346,7 +347,7 @@ static int stub_device_free(struct stub_device *sdev) return -EINVAL; kfree(sdev); - usbip_udbg("kfree udev ok\n"); + pr_debug("kfree udev ok\n"); return 0; } @@ -376,9 +377,8 @@ static int stub_probe(struct usb_interface *interface, busid_priv = get_busid_priv(udev_busid); if (!busid_priv || (busid_priv->status == STUB_BUSID_REMOV) || (busid_priv->status == STUB_BUSID_OTHER)) { - dev_info(&interface->dev, - "this device %s is not in match_busid table. skip!\n", - udev_busid); + dev_info(&interface->dev, "%s is not in match_busid table... " + "skip!\n", udev_busid); /* * Return value should be ENODEV or ENOXIO to continue trying @@ -388,15 +388,15 @@ static int stub_probe(struct usb_interface *interface, return -ENODEV; } - if (udev->descriptor.bDeviceClass == USB_CLASS_HUB) { - usbip_udbg("this device %s is a usb hub device. skip!\n", - udev_busid); + if (udev->descriptor.bDeviceClass == USB_CLASS_HUB) { + dev_dbg(&udev->dev, "%s is a usb hub device... skip!\n", + udev_busid); return -ENODEV; } if (!strcmp(udev->bus->bus_name, "vhci_hcd")) { - usbip_udbg("this device %s is attached on vhci_hcd. skip!\n", - udev_busid); + dev_dbg(&udev->dev, "%s is attached on vhci_hcd... skip!\n", + udev_busid); return -ENODEV; } @@ -406,8 +406,7 @@ static int stub_probe(struct usb_interface *interface, return -ENODEV; busid_priv->interf_count++; - dev_info(&interface->dev, - "USB/IP Stub: register a new interface " + dev_info(&interface->dev, "usbip-host: register new interface " "(bus %u dev %u ifn %u)\n", udev->bus->busnum, udev->devnum, interface->cur_altsetting->desc.bInterfaceNumber); @@ -417,7 +416,7 @@ static int stub_probe(struct usb_interface *interface, err = stub_add_files(&interface->dev); if (err) { - dev_err(&interface->dev, "create sysfs files for %s\n", + dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid); usb_set_intfdata(interface, NULL); busid_priv->interf_count--; @@ -434,7 +433,7 @@ static int stub_probe(struct usb_interface *interface, if (!sdev) return -ENOMEM; - dev_info(&interface->dev, "USB/IP Stub: register a new device " + dev_info(&interface->dev, "usbip-host: register new device " "(bus %u dev %u ifn %u)\n", udev->bus->busnum, udev->devnum, interface->cur_altsetting->desc.bInterfaceNumber); @@ -449,8 +448,7 @@ static int stub_probe(struct usb_interface *interface, err = stub_add_files(&interface->dev); if (err) { - dev_err(&interface->dev, "create sysfs files for %s\n", - udev_busid); + dev_err(&interface->dev, "stub_add_files for %s\n", udev_busid); usb_set_intfdata(interface, NULL); usb_put_intf(interface); @@ -486,10 +484,9 @@ static void stub_disconnect(struct usb_interface *interface) const char *udev_busid = dev_name(interface->dev.parent); struct bus_id_priv *busid_priv; - busid_priv = get_busid_priv(udev_busid); - - usbip_udbg("Enter\n"); + dev_dbg(&interface->dev, "Enter\n"); + busid_priv = get_busid_priv(udev_busid); if (!busid_priv) { BUG(); return; @@ -499,7 +496,7 @@ static void stub_disconnect(struct usb_interface *interface) /* get stub_device */ if (!sdev) { - err(" could not get device from inteface data"); + dev_err(&interface->dev, "could not get device"); /* BUG(); */ return; } @@ -543,5 +540,4 @@ static void stub_disconnect(struct usb_interface *interface) busid_priv->status = STUB_BUSID_OTHER; del_match_busid((char *)udev_busid); } - usbip_udbg("bye\n"); } |