Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=64771a0f19320f73ab4be69db591ba51a17d7748
Commit:     64771a0f19320f73ab4be69db591ba51a17d7748
Parent:     491c021e0beafe4146f6a1c9a1c58bd0fb2a42d0
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 10:58:02 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 17:46:07 2007 -0700

    USB: misc: legousbtower: clean up urb->status usage
    
    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 <[EMAIL PROTECTED]>
---
 drivers/usb/misc/legousbtower.c |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 2ed0dae..561970b 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -742,19 +742,20 @@ exit:
 static void tower_interrupt_in_callback (struct urb *urb)
 {
        struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
+       int status = urb->status;
        int retval;
 
-       dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
+       dbg(4, "%s: enter, status %d", __FUNCTION__, status);
 
        lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, 
urb->transfer_buffer);
 
-       if (urb->status) {
-               if (urb->status == -ENOENT ||
-                   urb->status == -ECONNRESET ||
-                   urb->status == -ESHUTDOWN) {
+       if (status) {
+               if (status == -ENOENT ||
+                   status == -ECONNRESET ||
+                   status == -ESHUTDOWN) {
                        goto exit;
                } else {
-                       dbg(1, "%s: nonzero status received: %d", __FUNCTION__, 
urb->status);
+                       dbg(1, "%s: nonzero status received: %d", __FUNCTION__, 
status);
                        goto resubmit; /* maybe we can recover */
                }
        }
@@ -788,7 +789,7 @@ exit:
        wake_up_interruptible (&dev->read_wait);
 
        lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, 
urb->transfer_buffer);
-       dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
+       dbg(4, "%s: leave, status %d", __FUNCTION__, status);
 }
 
 
@@ -798,23 +799,24 @@ exit:
 static void tower_interrupt_out_callback (struct urb *urb)
 {
        struct lego_usb_tower *dev = (struct lego_usb_tower *)urb->context;
+       int status = urb->status;
 
-       dbg(4, "%s: enter, status %d", __FUNCTION__, urb->status);
+       dbg(4, "%s: enter, status %d", __FUNCTION__, status);
        lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, 
urb->transfer_buffer);
 
        /* sync/async unlink faults aren't errors */
-       if (urb->status && !(urb->status == -ENOENT ||
-                            urb->status == -ECONNRESET ||
-                            urb->status == -ESHUTDOWN)) {
+       if (status && !(status == -ENOENT ||
+                       status == -ECONNRESET ||
+                       status == -ESHUTDOWN)) {
                dbg(1, "%s - nonzero write bulk status received: %d",
-                   __FUNCTION__, urb->status);
+                   __FUNCTION__, status);
        }
 
        dev->interrupt_out_busy = 0;
        wake_up_interruptible(&dev->write_wait);
 
        lego_usb_tower_debug_data(5, __FUNCTION__, urb->actual_length, 
urb->transfer_buffer);
-       dbg(4, "%s: leave, status %d", __FUNCTION__, urb->status);
+       dbg(4, "%s: leave, status %d", __FUNCTION__, status);
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to