diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-26 19:30:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 19:10:02 -0400 |
commit | 38726bf5417972ff51b8f047ab4e79f0333f2cf0 (patch) | |
tree | 7cdce22f7cc9742f6ab41b6d87d3dd51c7174422 /drivers/usb/misc/legousbtower.c | |
parent | 4dae99638097b254c863c541368598f5a80e41bf (diff) |
USB: legotower: remove direct calls to printk()
Use the pr_* calls instead, which are much more descriptive.
Cc: Juergen Stuber <starblue@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc/legousbtower.c')
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 6df99dc4fe87..eb37c9542052 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -75,6 +75,8 @@ | |||
75 | * - move reset into open to clean out spurious data | 75 | * - move reset into open to clean out spurious data |
76 | */ | 76 | */ |
77 | 77 | ||
78 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
79 | |||
78 | #include <linux/kernel.h> | 80 | #include <linux/kernel.h> |
79 | #include <linux/errno.h> | 81 | #include <linux/errno.h> |
80 | #include <linux/init.h> | 82 | #include <linux/init.h> |
@@ -325,8 +327,7 @@ static int tower_open (struct inode *inode, struct file *file) | |||
325 | interface = usb_find_interface (&tower_driver, subminor); | 327 | interface = usb_find_interface (&tower_driver, subminor); |
326 | 328 | ||
327 | if (!interface) { | 329 | if (!interface) { |
328 | printk(KERN_ERR "%s - error, can't find device for minor %d\n", | 330 | pr_err("error, can't find device for minor %d\n", subminor); |
329 | __func__, subminor); | ||
330 | retval = -ENODEV; | 331 | retval = -ENODEV; |
331 | goto exit; | 332 | goto exit; |
332 | } | 333 | } |
@@ -563,7 +564,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count, | |||
563 | /* verify that the device wasn't unplugged */ | 564 | /* verify that the device wasn't unplugged */ |
564 | if (dev->udev == NULL) { | 565 | if (dev->udev == NULL) { |
565 | retval = -ENODEV; | 566 | retval = -ENODEV; |
566 | printk(KERN_ERR "legousbtower: No device or device unplugged %d\n", retval); | 567 | pr_err("No device or device unplugged %d\n", retval); |
567 | goto unlock_exit; | 568 | goto unlock_exit; |
568 | } | 569 | } |
569 | 570 | ||
@@ -649,7 +650,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t | |||
649 | /* verify that the device wasn't unplugged */ | 650 | /* verify that the device wasn't unplugged */ |
650 | if (dev->udev == NULL) { | 651 | if (dev->udev == NULL) { |
651 | retval = -ENODEV; | 652 | retval = -ENODEV; |
652 | printk(KERN_ERR "legousbtower: No device or device unplugged %d\n", retval); | 653 | pr_err("No device or device unplugged %d\n", retval); |
653 | goto unlock_exit; | 654 | goto unlock_exit; |
654 | } | 655 | } |
655 | 656 | ||
@@ -748,7 +749,8 @@ static void tower_interrupt_in_callback (struct urb *urb) | |||
748 | dev_dbg(&dev->udev->dev, "%s: received %d bytes\n", | 749 | dev_dbg(&dev->udev->dev, "%s: received %d bytes\n", |
749 | __func__, urb->actual_length); | 750 | __func__, urb->actual_length); |
750 | } else { | 751 | } else { |
751 | printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length); | 752 | pr_warn("read_buffer overflow, %d bytes dropped\n", |
753 | urb->actual_length); | ||
752 | } | 754 | } |
753 | spin_unlock (&dev->read_buffer_lock); | 755 | spin_unlock (&dev->read_buffer_lock); |
754 | } | 756 | } |