Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2a393f5fd872fad99d639812087383111074cfeb
Commit:     2a393f5fd872fad99d639812087383111074cfeb
Parent:     fbd272254b034e22a5157af51c8c5907a8f69614
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:33 2007 -0700

    USB: serial: io_edgeport: 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: Al Borchers <[EMAIL PROTECTED]>
    Cc: Peter Berger <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/io_edgeport.c |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index 056e192..cebb32f 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -599,10 +599,11 @@ static void edge_interrupt_callback (struct urb *urb)
        int txCredits;
        int portNumber;
        int result;
+       int status = urb->status;
 
        dbg("%s", __FUNCTION__);
 
-       switch (urb->status) {
+       switch (status) {
        case 0:
                /* success */
                break;
@@ -610,10 +611,12 @@ static void edge_interrupt_callback (struct urb *urb)
        case -ENOENT:
        case -ESHUTDOWN:
                /* this urb is terminated, clean up */
-               dbg("%s - urb shutting down with status: %d", __FUNCTION__, 
urb->status);
+               dbg("%s - urb shutting down with status: %d",
+                   __FUNCTION__, status);
                return;
        default:
-               dbg("%s - nonzero urb status received: %d", __FUNCTION__, 
urb->status);
+               dbg("%s - nonzero urb status received: %d",
+                   __FUNCTION__, status);
                goto exit;
        }
 
@@ -688,13 +691,15 @@ static void edge_bulk_in_callback (struct urb *urb)
 {
        struct edgeport_serial  *edge_serial = (struct edgeport_serial 
*)urb->context;
        unsigned char           *data = urb->transfer_buffer;
-       int                     status;
+       int                     retval;
        __u16                   raw_data_length;
+       int status = urb->status;
 
        dbg("%s", __FUNCTION__);
 
-       if (urb->status) {
-               dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, 
urb->status);
+       if (status) {
+               dbg("%s - nonzero read bulk status received: %d",
+                   __FUNCTION__, status);
                edge_serial->read_in_progress = false;
                return;
        }
@@ -722,9 +727,11 @@ static void edge_bulk_in_callback (struct urb *urb)
        if (edge_serial->rxBytesAvail > 0) {
                dbg("%s - posting a read", __FUNCTION__);
                edge_serial->read_urb->dev = edge_serial->serial->dev;
-               status = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
-               if (status) {
-                       dev_err(&urb->dev->dev, "%s - usb_submit_urb(read bulk) 
failed, status = %d\n", __FUNCTION__, status);
+               retval = usb_submit_urb(edge_serial->read_urb, GFP_ATOMIC);
+               if (retval) {
+                       dev_err(&urb->dev->dev,
+                               "%s - usb_submit_urb(read bulk) failed, "
+                               "retval = %d\n", __FUNCTION__, retval);
                        edge_serial->read_in_progress = false;
                }
        } else {
@@ -744,11 +751,13 @@ static void edge_bulk_out_data_callback (struct urb *urb)
 {
        struct edgeport_port *edge_port = (struct edgeport_port *)urb->context;
        struct tty_struct *tty;
+       int status = urb->status;
 
        dbg("%s", __FUNCTION__);
 
-       if (urb->status) {
-               dbg("%s - nonzero write bulk status received: %d", 
__FUNCTION__, urb->status);
+       if (status) {
+               dbg("%s - nonzero write bulk status received: %d",
+                   __FUNCTION__, status);
        }
 
        tty = edge_port->port->tty;
-
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