Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=18ac3016055b58d676f6148a77dcf539d05ce215
Commit:     18ac3016055b58d676f6148a77dcf539d05ce215
Parent:     185d40587d22fe604962fb53c0c9a9f1670feb66
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:06 2007 -0700

    USB: class: usblp: 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/class/usblp.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 80ec103..5192cd9 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -289,16 +289,17 @@ static int proto_bias = -1;
 static void usblp_bulk_read(struct urb *urb)
 {
        struct usblp *usblp = urb->context;
+       int status = urb->status;
 
        if (usblp->present && usblp->used) {
-               if (urb->status)
+               if (status)
                        printk(KERN_WARNING "usblp%d: "
                            "nonzero read bulk status received: %d\n",
-                           usblp->minor, urb->status);
+                           usblp->minor, status);
        }
        spin_lock(&usblp->lock);
-       if (urb->status < 0)
-               usblp->rstatus = urb->status;
+       if (status < 0)
+               usblp->rstatus = status;
        else
                usblp->rstatus = urb->actual_length;
        usblp->rcomplete = 1;
@@ -311,16 +312,17 @@ static void usblp_bulk_read(struct urb *urb)
 static void usblp_bulk_write(struct urb *urb)
 {
        struct usblp *usblp = urb->context;
+       int status = urb->status;
 
        if (usblp->present && usblp->used) {
-               if (urb->status)
+               if (status)
                        printk(KERN_WARNING "usblp%d: "
                            "nonzero write bulk status received: %d\n",
-                           usblp->minor, urb->status);
+                           usblp->minor, status);
        }
        spin_lock(&usblp->lock);
-       if (urb->status < 0)
-               usblp->wstatus = urb->status;
+       if (status < 0)
+               usblp->wstatus = status;
        else
                usblp->wstatus = urb->actual_length;
        usblp->wcomplete = 1;
-
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