diff options
Diffstat (limited to 'drivers/usb/misc/adutux.c')
| -rw-r--r-- | drivers/usb/misc/adutux.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c index d8d157c4c271..ed6a19254d2f 100644 --- a/drivers/usb/misc/adutux.c +++ b/drivers/usb/misc/adutux.c @@ -109,7 +109,7 @@ static inline void adu_debug_data(struct device *dev, const char *function, function, size, size, data); } -/** +/* * adu_abort_transfers * aborts transfers and frees associated data structures */ @@ -183,10 +183,10 @@ static void adu_interrupt_in_callback(struct urb *urb) dev->interrupt_in_buffer, urb->actual_length); dev->read_buffer_length += urb->actual_length; - dev_dbg(&dev->udev->dev,"%s reading %d\n", __func__, + dev_dbg(&dev->udev->dev, "%s reading %d\n", __func__, urb->actual_length); } else { - dev_dbg(&dev->udev->dev,"%s : read_buffer overflow\n", + dev_dbg(&dev->udev->dev, "%s : read_buffer overflow\n", __func__); } } @@ -209,6 +209,7 @@ static void adu_interrupt_out_callback(struct urb *urb) if (status != 0) { if ((status != -ENOENT) && + (status != -ESHUTDOWN) && (status != -ECONNRESET)) { dev_dbg(&dev->udev->dev, "%s :nonzero status received: %d\n", __func__, @@ -393,13 +394,10 @@ static ssize_t adu_read(struct file *file, __user char *buffer, size_t count, spin_lock_irqsave (&dev->buflock, flags); if (dev->read_buffer_length) { /* we secure access to the primary */ - char *tmp; dev_dbg(&dev->udev->dev, "%s : swap, read_buffer_length = %d\n", __func__, dev->read_buffer_length); - tmp = dev->read_buffer_secondary; - dev->read_buffer_secondary = dev->read_buffer_primary; - dev->read_buffer_primary = tmp; + swap(dev->read_buffer_primary, dev->read_buffer_secondary); dev->secondary_head = 0; dev->secondary_tail = dev->read_buffer_length; dev->read_buffer_length = 0; @@ -642,7 +640,7 @@ static struct usb_class_driver adu_class = { .minor_base = ADU_MINOR_BASE, }; -/** +/* * adu_probe * * Called by the usb core when a new device is connected that it thinks @@ -725,7 +723,7 @@ static int adu_probe(struct usb_interface *interface, retval = -EIO; goto error; } - dev_dbg(&interface->dev,"serial_number=%s", dev->serial_number); + dev_dbg(&interface->dev, "serial_number=%s", dev->serial_number); /* we can register the device now, as it is ready */ usb_set_intfdata(interface, dev); @@ -753,7 +751,7 @@ error: return retval; } -/** +/* * adu_disconnect * * Called by the usb core when the device is removed from the system. |
