aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-06-15 18:44:13 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:34:32 -0400
commitd3434cf6916d9014d7906b3b2513f8fe325a6d5c (patch)
treeee1b9d54297664d600059350d3dee90bc6333cd0 /drivers/usb
parent1373dbbca55503804ed191ba3914af68ce01e4bc (diff)
USB: serial: airprime: 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: <linux-usb-devel@lists.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/airprime.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 39a498362594..cff6fd190a28 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -82,12 +82,13 @@ static void airprime_read_bulk_callback(struct urb *urb)
82 unsigned char *data = urb->transfer_buffer; 82 unsigned char *data = urb->transfer_buffer;
83 struct tty_struct *tty; 83 struct tty_struct *tty;
84 int result; 84 int result;
85 int status = urb->status;
85 86
86 dbg("%s - port %d", __FUNCTION__, port->number); 87 dbg("%s - port %d", __FUNCTION__, port->number);
87 88
88 if (urb->status) { 89 if (status) {
89 dbg("%s - nonzero read bulk status received: %d", 90 dbg("%s - nonzero read bulk status received: %d",
90 __FUNCTION__, urb->status); 91 __FUNCTION__, status);
91 return; 92 return;
92 } 93 }
93 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); 94 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data);
@@ -109,6 +110,7 @@ static void airprime_write_bulk_callback(struct urb *urb)
109{ 110{
110 struct usb_serial_port *port = urb->context; 111 struct usb_serial_port *port = urb->context;
111 struct airprime_private *priv = usb_get_serial_port_data(port); 112 struct airprime_private *priv = usb_get_serial_port_data(port);
113 int status = urb->status;
112 unsigned long flags; 114 unsigned long flags;
113 115
114 dbg("%s - port %d", __FUNCTION__, port->number); 116 dbg("%s - port %d", __FUNCTION__, port->number);
@@ -116,9 +118,9 @@ static void airprime_write_bulk_callback(struct urb *urb)
116 /* free up the transfer buffer, as usb_free_urb() does not do this */ 118 /* free up the transfer buffer, as usb_free_urb() does not do this */
117 kfree (urb->transfer_buffer); 119 kfree (urb->transfer_buffer);
118 120
119 if (urb->status) 121 if (status)
120 dbg("%s - nonzero write bulk status received: %d", 122 dbg("%s - nonzero write bulk status received: %d",
121 __FUNCTION__, urb->status); 123 __FUNCTION__, status);
122 spin_lock_irqsave(&priv->lock, flags); 124 spin_lock_irqsave(&priv->lock, flags);
123 --priv->outstanding_urbs; 125 --priv->outstanding_urbs;
124 spin_unlock_irqrestore(&priv->lock, flags); 126 spin_unlock_irqrestore(&priv->lock, flags);