Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0fb0aa188d0e61d58485288071e73d3766513f2a
Commit:     0fb0aa188d0e61d58485288071e73d3766513f2a
Parent:     335202f44a9a68902a80e09ba33aa4eaddc9c8ed
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 15 15:44:13 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jul 12 16:34:32 2007 -0700

    USB: serial: ftdi_sio: 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.
    
    
    Cc: <[EMAIL PROTECTED]>
    Cc: Kuba Ober <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/ftdi_sio.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 3edd13f..4066a46 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1576,14 +1576,15 @@ static void ftdi_write_bulk_callback (struct urb *urb)
        struct ftdi_private *priv;
        int data_offset;       /* will be 1 for the SIO and 0 otherwise */
        unsigned long countback;
+       int status = urb->status;
 
        /* free up the transfer buffer, as usb_free_urb() does not do this */
        kfree (urb->transfer_buffer);
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       if (urb->status) {
-               dbg("nonzero write bulk status received: %d", urb->status);
+       if (status) {
+               dbg("nonzero write bulk status received: %d", status);
                return;
        }
 
@@ -1659,6 +1660,7 @@ static void ftdi_read_bulk_callback (struct urb *urb)
        struct ftdi_private *priv;
        unsigned long countread;
        unsigned long flags;
+       int status = urb->status;
 
        if (urb->number_of_packets > 0) {
                err("%s transfer_buffer_length %d actual_length %d number of 
packets %d",__FUNCTION__,
@@ -1687,9 +1689,10 @@ static void ftdi_read_bulk_callback (struct urb *urb)
                err("%s - Not my urb!", __FUNCTION__);
        }
 
-       if (urb->status) {
+       if (status) {
                /* This will happen at close every time so it is a dbg not an 
err */
-               dbg("(this is ok on close) nonzero read bulk status received: 
%d", urb->status);
+               dbg("(this is ok on close) nonzero read bulk status received: "
+                   "%d", status);
                return;
        }
 
-
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