aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-26 19:30:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 19:10:02 -0400
commitfef526cae700471ba37279e41b88e1c3bfdda1b9 (patch)
treee525c2f8bdce0c543adb979f9a1eea4b9b75979f /drivers/usb/misc
parentd26f6e57e71169bab907bdf716021b2d19bd09f0 (diff)
USB: legousbtower: remove custom debug macro
Don't use a custom debug macro for just one driver, instead rely on the in-kernel dynamic debugging logic, which can handle this much better. Cc: Juergen Stuber <starblue@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/legousbtower.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 93c95d09f04e..4a5a8b16d7b5 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -443,7 +443,6 @@ static int tower_release (struct inode *inode, struct file *file)
443 dev = file->private_data; 443 dev = file->private_data;
444 444
445 if (dev == NULL) { 445 if (dev == NULL) {
446 dbg(1, "%s: object is NULL", __func__);
447 retval = -ENODEV; 446 retval = -ENODEV;
448 goto exit_nolock; 447 goto exit_nolock;
449 } 448 }
@@ -455,7 +454,8 @@ static int tower_release (struct inode *inode, struct file *file)
455 } 454 }
456 455
457 if (dev->open_count != 1) { 456 if (dev->open_count != 1) {
458 dbg(1, "%s: device not opened exactly once", __func__); 457 dev_dbg(&dev->udev->dev, "%s: device not opened exactly once\n",
458 __func__);
459 retval = -ENODEV; 459 retval = -ENODEV;
460 goto unlock_exit; 460 goto unlock_exit;
461 } 461 }
@@ -491,10 +491,8 @@ exit_nolock:
491 */ 491 */
492static void tower_abort_transfers (struct lego_usb_tower *dev) 492static void tower_abort_transfers (struct lego_usb_tower *dev)
493{ 493{
494 if (dev == NULL) { 494 if (dev == NULL)
495 dbg(1, "%s: dev is null", __func__);
496 return; 495 return;
497 }
498 496
499 /* shutdown transfer */ 497 /* shutdown transfer */
500 if (dev->interrupt_in_running) { 498 if (dev->interrupt_in_running) {
@@ -594,7 +592,7 @@ static ssize_t tower_read (struct file *file, char __user *buffer, size_t count,
594 592
595 /* verify that we actually have some data to read */ 593 /* verify that we actually have some data to read */
596 if (count == 0) { 594 if (count == 0) {
597 dbg(1, "%s: read request of 0 bytes", __func__); 595 dev_dbg(&dev->udev->dev, "read request of 0 bytes\n");
598 goto unlock_exit; 596 goto unlock_exit;
599 } 597 }
600 598
@@ -680,7 +678,7 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
680 678
681 /* verify that we actually have some data to write */ 679 /* verify that we actually have some data to write */
682 if (count == 0) { 680 if (count == 0) {
683 dbg(1, "%s: write request of 0 bytes", __func__); 681 dev_dbg(&dev->udev->dev, "write request of 0 bytes\n");
684 goto unlock_exit; 682 goto unlock_exit;
685 } 683 }
686 684
@@ -698,7 +696,8 @@ static ssize_t tower_write (struct file *file, const char __user *buffer, size_t
698 696
699 /* write the data into interrupt_out_buffer from userspace */ 697 /* write the data into interrupt_out_buffer from userspace */
700 bytes_to_write = min_t(int, count, write_buffer_size); 698 bytes_to_write = min_t(int, count, write_buffer_size);
701 dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __func__, count, bytes_to_write); 699 dev_dbg(&dev->udev->dev, "%s: count = %Zd, bytes_to_write = %Zd\n",
700 __func__, count, bytes_to_write);
702 701
703 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) { 702 if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
704 retval = -EFAULT; 703 retval = -EFAULT;
@@ -753,7 +752,9 @@ static void tower_interrupt_in_callback (struct urb *urb)
753 status == -ESHUTDOWN) { 752 status == -ESHUTDOWN) {
754 goto exit; 753 goto exit;
755 } else { 754 } else {
756 dbg(1, "%s: nonzero status received: %d", __func__, status); 755 dev_dbg(&dev->udev->dev,
756 "%s: nonzero status received: %d\n", __func__,
757 status);
757 goto resubmit; /* maybe we can recover */ 758 goto resubmit; /* maybe we can recover */
758 } 759 }
759 } 760 }
@@ -766,7 +767,8 @@ static void tower_interrupt_in_callback (struct urb *urb)
766 urb->actual_length); 767 urb->actual_length);
767 dev->read_buffer_length += urb->actual_length; 768 dev->read_buffer_length += urb->actual_length;
768 dev->read_last_arrival = jiffies; 769 dev->read_last_arrival = jiffies;
769 dbg(3, "%s: received %d bytes", __func__, urb->actual_length); 770 dev_dbg(&dev->udev->dev, "%s: received %d bytes\n",
771 __func__, urb->actual_length);
770 } else { 772 } else {
771 printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length); 773 printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
772 } 774 }
@@ -805,8 +807,9 @@ static void tower_interrupt_out_callback (struct urb *urb)
805 if (status && !(status == -ENOENT || 807 if (status && !(status == -ENOENT ||
806 status == -ECONNRESET || 808 status == -ECONNRESET ||
807 status == -ESHUTDOWN)) { 809 status == -ESHUTDOWN)) {
808 dbg(1, "%s - nonzero write bulk status received: %d", 810 dev_dbg(&dev->udev->dev,
809 __func__, status); 811 "%s: nonzero write bulk status received: %d\n", __func__,
812 status);
810 } 813 }
811 814
812 dev->interrupt_out_busy = 0; 815 dev->interrupt_out_busy = 0;