aboutsummaryrefslogtreecommitdiffstats
path: root/applied/usb-legousbtower-remove-custom-debug-macro.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 14:45:58 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 14:45:58 -0700
commit6866d52ad99a8c2c5301c7371fce365d25b2d0be (patch)
treef39adaa4087fd91ed21e7fd81c09ace7b2d9228d /applied/usb-legousbtower-remove-custom-debug-macro.patch
parente275d064f56be8b9dec6fc2e33d6b075dcc2ac62 (diff)
downloadpatches-6866d52ad99a8c2c5301c7371fce365d25b2d0be.tar.gz
move applied patches to applied/ and add a pwm patch
Diffstat (limited to 'applied/usb-legousbtower-remove-custom-debug-macro.patch')
-rw-r--r--applied/usb-legousbtower-remove-custom-debug-macro.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/applied/usb-legousbtower-remove-custom-debug-macro.patch b/applied/usb-legousbtower-remove-custom-debug-macro.patch
new file mode 100644
index 00000000000000..20e64efbc0d07e
--- /dev/null
+++ b/applied/usb-legousbtower-remove-custom-debug-macro.patch
@@ -0,0 +1,110 @@
+From foo@baz Wed Jun 26 16:16:21 PDT 2013
+Date: Wed, 26 Jun 2013 16:16:21 -0700
+To: Greg KH <gregkh@linuxfoundation.org>, Juergen Stuber <starblue@users.sourceforge.net>
+Cc: linux-usb@vger.kernel.org
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: 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>
+
+---
+ drivers/usb/misc/legousbtower.c | 27 +++++++++++++++------------
+ 1 file changed, 15 insertions(+), 12 deletions(-)
+
+--- a/drivers/usb/misc/legousbtower.c
++++ b/drivers/usb/misc/legousbtower.c
+@@ -443,7 +443,6 @@ static int tower_release (struct inode *
+ dev = file->private_data;
+
+ if (dev == NULL) {
+- dbg(1, "%s: object is NULL", __func__);
+ retval = -ENODEV;
+ goto exit_nolock;
+ }
+@@ -455,7 +454,8 @@ static int tower_release (struct inode *
+ }
+
+ if (dev->open_count != 1) {
+- dbg(1, "%s: device not opened exactly once", __func__);
++ dev_dbg(&dev->udev->dev, "%s: device not opened exactly once\n",
++ __func__);
+ retval = -ENODEV;
+ goto unlock_exit;
+ }
+@@ -491,10 +491,8 @@ exit_nolock:
+ */
+ static void tower_abort_transfers (struct lego_usb_tower *dev)
+ {
+- if (dev == NULL) {
+- dbg(1, "%s: dev is null", __func__);
++ if (dev == NULL)
+ return;
+- }
+
+ /* shutdown transfer */
+ if (dev->interrupt_in_running) {
+@@ -594,7 +592,7 @@ static ssize_t tower_read (struct file *
+
+ /* verify that we actually have some data to read */
+ if (count == 0) {
+- dbg(1, "%s: read request of 0 bytes", __func__);
++ dev_dbg(&dev->udev->dev, "read request of 0 bytes\n");
+ goto unlock_exit;
+ }
+
+@@ -680,7 +678,7 @@ static ssize_t tower_write (struct file
+
+ /* verify that we actually have some data to write */
+ if (count == 0) {
+- dbg(1, "%s: write request of 0 bytes", __func__);
++ dev_dbg(&dev->udev->dev, "write request of 0 bytes\n");
+ goto unlock_exit;
+ }
+
+@@ -698,7 +696,8 @@ static ssize_t tower_write (struct file
+
+ /* write the data into interrupt_out_buffer from userspace */
+ bytes_to_write = min_t(int, count, write_buffer_size);
+- dbg(4, "%s: count = %Zd, bytes_to_write = %Zd", __func__, count, bytes_to_write);
++ dev_dbg(&dev->udev->dev, "%s: count = %Zd, bytes_to_write = %Zd\n",
++ __func__, count, bytes_to_write);
+
+ if (copy_from_user (dev->interrupt_out_buffer, buffer, bytes_to_write)) {
+ retval = -EFAULT;
+@@ -753,7 +752,9 @@ static void tower_interrupt_in_callback
+ status == -ESHUTDOWN) {
+ goto exit;
+ } else {
+- dbg(1, "%s: nonzero status received: %d", __func__, status);
++ dev_dbg(&dev->udev->dev,
++ "%s: nonzero status received: %d\n", __func__,
++ status);
+ goto resubmit; /* maybe we can recover */
+ }
+ }
+@@ -766,7 +767,8 @@ static void tower_interrupt_in_callback
+ urb->actual_length);
+ dev->read_buffer_length += urb->actual_length;
+ dev->read_last_arrival = jiffies;
+- dbg(3, "%s: received %d bytes", __func__, urb->actual_length);
++ dev_dbg(&dev->udev->dev, "%s: received %d bytes\n",
++ __func__, urb->actual_length);
+ } else {
+ printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
+ }
+@@ -805,8 +807,9 @@ static void tower_interrupt_out_callback
+ if (status && !(status == -ENOENT ||
+ status == -ECONNRESET ||
+ status == -ESHUTDOWN)) {
+- dbg(1, "%s - nonzero write bulk status received: %d",
+- __func__, status);
++ dev_dbg(&dev->udev->dev,
++ "%s: nonzero write bulk status received: %d\n", __func__,
++ status);
+ }
+
+ dev->interrupt_out_busy = 0;