diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-20 19:53:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-20 19:53:47 -0400 |
commit | b22862e5197ea6471f37710bd3a853a4802c6bf4 (patch) | |
tree | dda0ba06e4eba7eb11918d1d8d8a4b0928fb8ea5 /drivers/usb/misc | |
parent | 1c2eef03e498e92a924972ba237559b6798943d8 (diff) |
USB: ldusb.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.
CC: Michael Hund <mhund@ld-didactic.de>
CC: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
CC: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/ldusb.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c index 5db4ab52061e..ac762299eaa8 100644 --- a/drivers/usb/misc/ldusb.c +++ b/drivers/usb/misc/ldusb.c | |||
@@ -334,8 +334,8 @@ static int ld_usb_open(struct inode *inode, struct file *file) | |||
334 | interface = usb_find_interface(&ld_usb_driver, subminor); | 334 | interface = usb_find_interface(&ld_usb_driver, subminor); |
335 | 335 | ||
336 | if (!interface) { | 336 | if (!interface) { |
337 | err("%s - error, can't find device for minor %d\n", | 337 | printk(KERN_ERR "%s - error, can't find device for minor %d\n", |
338 | __func__, subminor); | 338 | __func__, subminor); |
339 | return -ENODEV; | 339 | return -ENODEV; |
340 | } | 340 | } |
341 | 341 | ||
@@ -485,7 +485,7 @@ static ssize_t ld_usb_read(struct file *file, char __user *buffer, size_t count, | |||
485 | /* verify that the device wasn't unplugged */ | 485 | /* verify that the device wasn't unplugged */ |
486 | if (dev->intf == NULL) { | 486 | if (dev->intf == NULL) { |
487 | retval = -ENODEV; | 487 | retval = -ENODEV; |
488 | err("No device or device unplugged %d\n", retval); | 488 | printk(KERN_ERR "ldusb: No device or device unplugged %d\n", retval); |
489 | goto unlock_exit; | 489 | goto unlock_exit; |
490 | } | 490 | } |
491 | 491 | ||
@@ -565,7 +565,7 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer, | |||
565 | /* verify that the device wasn't unplugged */ | 565 | /* verify that the device wasn't unplugged */ |
566 | if (dev->intf == NULL) { | 566 | if (dev->intf == NULL) { |
567 | retval = -ENODEV; | 567 | retval = -ENODEV; |
568 | err("No device or device unplugged %d\n", retval); | 568 | printk(KERN_ERR "ldusb: No device or device unplugged %d\n", retval); |
569 | goto unlock_exit; | 569 | goto unlock_exit; |
570 | } | 570 | } |
571 | 571 | ||
@@ -603,7 +603,9 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer, | |||
603 | bytes_to_write, | 603 | bytes_to_write, |
604 | USB_CTRL_SET_TIMEOUT * HZ); | 604 | USB_CTRL_SET_TIMEOUT * HZ); |
605 | if (retval < 0) | 605 | if (retval < 0) |
606 | err("Couldn't submit HID_REQ_SET_REPORT %d\n", retval); | 606 | dev_err(&dev->intf->dev, |
607 | "Couldn't submit HID_REQ_SET_REPORT %d\n", | ||
608 | retval); | ||
607 | goto unlock_exit; | 609 | goto unlock_exit; |
608 | } | 610 | } |
609 | 611 | ||
@@ -624,7 +626,8 @@ static ssize_t ld_usb_write(struct file *file, const char __user *buffer, | |||
624 | retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); | 626 | retval = usb_submit_urb(dev->interrupt_out_urb, GFP_KERNEL); |
625 | if (retval) { | 627 | if (retval) { |
626 | dev->interrupt_out_busy = 0; | 628 | dev->interrupt_out_busy = 0; |
627 | err("Couldn't submit interrupt_out_urb %d\n", retval); | 629 | dev_err(&dev->intf->dev, |
630 | "Couldn't submit interrupt_out_urb %d\n", retval); | ||
628 | goto unlock_exit; | 631 | goto unlock_exit; |
629 | } | 632 | } |
630 | retval = bytes_to_write; | 633 | retval = bytes_to_write; |