aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--usb-adutux-remove-custom-debug-macro.patch40
1 files changed, 20 insertions, 20 deletions
diff --git a/usb-adutux-remove-custom-debug-macro.patch b/usb-adutux-remove-custom-debug-macro.patch
index bc089104927697..e8482b5b86b4ee 100644
--- a/usb-adutux-remove-custom-debug-macro.patch
+++ b/usb-adutux-remove-custom-debug-macro.patch
@@ -67,19 +67,19 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
}
goto exit;
}
-@@ -261,10 +262,8 @@ static int adu_open(struct inode *inode,
-
+@@ -262,10 +263,8 @@ static int adu_open(struct inode *inode,
subminor = iminor(inode);
-- if ((retval = mutex_lock_interruptible(&adutux_mutex))) {
+ retval = mutex_lock_interruptible(&adutux_mutex);
+- if (retval) {
- dbg(2, "%s : mutex lock failed", __func__);
-+ if ((retval = mutex_lock_interruptible(&adutux_mutex)))
++ if (retval)
goto exit_no_lock;
- }
interface = usb_find_interface(&adu_driver, subminor);
if (!interface) {
-@@ -287,7 +286,8 @@ static int adu_open(struct inode *inode,
+@@ -288,7 +287,8 @@ static int adu_open(struct inode *inode,
}
++dev->open_count;
@@ -89,7 +89,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* save device in the file's private structure */
file->private_data = dev;
-@@ -324,7 +324,8 @@ static void adu_release_internal(struct
+@@ -325,7 +325,8 @@ static void adu_release_internal(struct
{
/* decrement our usage count for the device */
--dev->open_count;
@@ -99,22 +99,22 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (dev->open_count <= 0) {
adu_abort_transfers(dev);
dev->open_count = 0;
-@@ -337,14 +338,12 @@ static int adu_release(struct inode *ino
+@@ -338,14 +339,12 @@ static int adu_release(struct inode *ino
int retval = 0;
if (file == NULL) {
-- dbg(1, " %s : file is NULL", __func__);
+- dbg(1, " %s : file is NULL", __func__);
retval = -ENODEV;
goto exit;
}
dev = file->private_data;
if (dev == NULL) {
-- dbg(1, " %s : object is NULL", __func__);
+- dbg(1, " %s : object is NULL", __func__);
retval = -ENODEV;
goto exit;
}
-@@ -352,7 +351,7 @@ static int adu_release(struct inode *ino
+@@ -353,7 +352,7 @@ static int adu_release(struct inode *ino
mutex_lock(&adutux_mutex); /* not interruptible */
if (dev->open_count <= 0) {
@@ -123,7 +123,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
retval = -ENODEV;
goto unlock;
}
-@@ -396,17 +395,19 @@ static ssize_t adu_read(struct file *fil
+@@ -397,17 +396,19 @@ static ssize_t adu_read(struct file *fil
/* verify that some data was requested */
if (count == 0) {
@@ -148,7 +148,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (data_in_secondary) {
/* drain secondary buffer */
-@@ -429,8 +430,9 @@ static ssize_t adu_read(struct file *fil
+@@ -430,8 +431,9 @@ static ssize_t adu_read(struct file *fil
if (dev->read_buffer_length) {
/* we secure access to the primary */
char *tmp;
@@ -160,7 +160,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tmp = dev->read_buffer_secondary;
dev->read_buffer_secondary = dev->read_buffer_primary;
dev->read_buffer_primary = tmp;
-@@ -445,10 +447,14 @@ static ssize_t adu_read(struct file *fil
+@@ -446,10 +448,14 @@ static ssize_t adu_read(struct file *fil
if (!dev->read_urb_finished) {
/* somebody is doing IO */
spin_unlock_irqrestore(&dev->buflock, flags);
@@ -177,7 +177,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dev->read_urb_finished = 0;
spin_unlock_irqrestore(&dev->buflock, flags);
-@@ -466,7 +472,9 @@ static ssize_t adu_read(struct file *fil
+@@ -467,7 +473,9 @@ static ssize_t adu_read(struct file *fil
if (retval == -ENOMEM) {
retval = bytes_read ? bytes_read : -ENOMEM;
}
@@ -188,7 +188,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
goto exit;
}
}
-@@ -485,13 +493,16 @@ static ssize_t adu_read(struct file *fil
+@@ -486,13 +494,16 @@ static ssize_t adu_read(struct file *fil
remove_wait_queue(&dev->read_wait, &wait);
if (timeout <= 0) {
@@ -207,7 +207,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
retval = bytes_read ? bytes_read : -EINTR;
goto exit;
}
-@@ -554,7 +565,8 @@ static ssize_t adu_write(struct file *fi
+@@ -555,7 +566,8 @@ static ssize_t adu_write(struct file *fi
/* verify that we actually have some data to write */
if (count == 0) {
@@ -217,7 +217,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
goto exit;
}
-@@ -567,13 +579,15 @@ static ssize_t adu_write(struct file *fi
+@@ -568,13 +580,15 @@ static ssize_t adu_write(struct file *fi
mutex_unlock(&dev->mtx);
if (signal_pending(current)) {
@@ -235,7 +235,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
retval = -ETIMEDOUT;
goto exit_onqueue;
}
-@@ -584,18 +598,22 @@ static ssize_t adu_write(struct file *fi
+@@ -585,18 +599,22 @@ static ssize_t adu_write(struct file *fi
goto exit_nolock;
}
@@ -262,7 +262,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (copy_from_user(dev->interrupt_out_buffer, buffer, bytes_to_write) != 0) {
retval = -EFAULT;
-@@ -778,7 +796,7 @@ static int adu_probe(struct usb_interfac
+@@ -779,7 +797,7 @@ static int adu_probe(struct usb_interfac
dev_err(&interface->dev, "Could not retrieve serial number\n");
goto error;
}
@@ -271,7 +271,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* we can register the device now, as it is ready */
usb_set_intfdata(interface, dev);
-@@ -828,7 +846,8 @@ static void adu_disconnect(struct usb_in
+@@ -829,7 +847,8 @@ static void adu_disconnect(struct usb_in
usb_set_intfdata(interface, NULL);
/* if the device is not opened, then we clean up right now */