Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1373dbbca55503804ed191ba3914af68ce01e4bc
Commit:     1373dbbca55503804ed191ba3914af68ce01e4bc
Parent:     4d0dce3e0b794942407391c52f8dd2760802f391
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:31 2007 -0700

    USB: serial: aircable: 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]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/aircable.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index fbc8c27..1cd29cd 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -411,12 +411,13 @@ static int aircable_write(struct usb_serial_port *port,
 static void aircable_write_bulk_callback(struct urb *urb)
 {
        struct usb_serial_port *port = urb->context;
+       int status = urb->status;
        int result;
 
-       dbg("%s - urb->status: %d", __FUNCTION__ , urb->status);
+       dbg("%s - urb status: %d", __FUNCTION__ , status);
 
        /* This has been taken from cypress_m8.c cypress_write_int_callback */
-       switch (urb->status) {
+       switch (status) {
                case 0:
                        /* success */
                        break;
@@ -425,14 +426,14 @@ static void aircable_write_bulk_callback(struct urb *urb)
                case -ESHUTDOWN:
                        /* this urb is terminated, clean up */
                        dbg("%s - urb shutting down with status: %d",
-                           __FUNCTION__, urb->status);
+                           __FUNCTION__, status);
                        port->write_urb_busy = 0;
                        return;
                default:
                        /* error in the urb, so we have to resubmit it */
                        dbg("%s - Overflow in write", __FUNCTION__);
                        dbg("%s - nonzero write bulk status received: %d",
-                           __FUNCTION__, urb->status);
+                           __FUNCTION__, status);
                        port->write_urb->transfer_buffer_length = 1;
                        port->write_urb->dev = port->serial->dev;
                        result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
@@ -457,16 +458,17 @@ static void aircable_read_bulk_callback(struct urb *urb)
        unsigned long no_packages, remaining, package_length, i;
        int result, shift = 0;
        unsigned char *temp;
+       int status = urb->status;
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       if (urb->status) {
-               dbg("%s - urb->status = %d", __FUNCTION__, urb->status);
+       if (status) {
+               dbg("%s - urb status = %d", __FUNCTION__, status);
                if (!port->open_count) {
                        dbg("%s - port is closed, exiting.", __FUNCTION__);
                        return;
                }
-               if (urb->status == -EPROTO) {
+               if (status == -EPROTO) {
                        dbg("%s - caught -EPROTO, resubmitting the urb",
                            __FUNCTION__);
                        usb_fill_bulk_urb(port->read_urb, port->serial->dev,
-
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