]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: misc: ftdi-elan: clean up urb->status usage
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 20 Jul 2007 00:46:07 +0000 (17:46 -0700)
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/ftdi-elan.c

index 7cc6883a6fa3330f7b3e19bde4f2a9d5286a087f..538b535e955ba0be89303c18a54076bfdc0f2743 100644 (file)
@@ -747,10 +747,12 @@ static ssize_t ftdi_elan_read(struct file *file, char __user *buffer,
 static void ftdi_elan_write_bulk_callback(struct urb *urb)
 {
         struct usb_ftdi *ftdi = (struct usb_ftdi *)urb->context;
-        if (urb->status && !(urb->status == -ENOENT || urb->status ==
-                -ECONNRESET || urb->status == -ESHUTDOWN)) {
+       int status = urb->status;
+
+       if (status && !(status == -ENOENT || status == -ECONNRESET ||
+           status == -ESHUTDOWN)) {
                 dev_err(&ftdi->udev->dev, "urb=%p write bulk status received: %"
-                        "d\n", urb, urb->status);
+                        "d\n", urb, status);
         }
         usb_buffer_free(urb->dev, urb->transfer_buffer_length,
                 urb->transfer_buffer, urb->transfer_dma);