diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-06-15 18:44:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:34:32 -0400 |
commit | 7dcc85cd9b7134bbcdc50dc14ccfc7c49f092506 (patch) | |
tree | d8fb0b7655447687d0c225e9dd01474eab939159 /drivers | |
parent | f26aad25d2c336a1efd393aff17bfe975b04fed5 (diff) |
USB: serial: cyberjack: 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>
Cc: <support@reiner-sct.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/cyberjack.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 4167753ed31f..4353df92487f 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c | |||
@@ -305,12 +305,13 @@ static void cyberjack_read_int_callback( struct urb *urb ) | |||
305 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 305 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
306 | struct cyberjack_private *priv = usb_get_serial_port_data(port); | 306 | struct cyberjack_private *priv = usb_get_serial_port_data(port); |
307 | unsigned char *data = urb->transfer_buffer; | 307 | unsigned char *data = urb->transfer_buffer; |
308 | int status = urb->status; | ||
308 | int result; | 309 | int result; |
309 | 310 | ||
310 | dbg("%s - port %d", __FUNCTION__, port->number); | 311 | dbg("%s - port %d", __FUNCTION__, port->number); |
311 | 312 | ||
312 | /* the urb might have been killed. */ | 313 | /* the urb might have been killed. */ |
313 | if (urb->status) | 314 | if (status) |
314 | return; | 315 | return; |
315 | 316 | ||
316 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); | 317 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); |
@@ -365,12 +366,14 @@ static void cyberjack_read_bulk_callback (struct urb *urb) | |||
365 | unsigned char *data = urb->transfer_buffer; | 366 | unsigned char *data = urb->transfer_buffer; |
366 | short todo; | 367 | short todo; |
367 | int result; | 368 | int result; |
369 | int status = urb->status; | ||
368 | 370 | ||
369 | dbg("%s - port %d", __FUNCTION__, port->number); | 371 | dbg("%s - port %d", __FUNCTION__, port->number); |
370 | 372 | ||
371 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); | 373 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); |
372 | if (urb->status) { | 374 | if (status) { |
373 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); | 375 | dbg("%s - nonzero read bulk status received: %d", |
376 | __FUNCTION__, status); | ||
374 | return; | 377 | return; |
375 | } | 378 | } |
376 | 379 | ||
@@ -411,12 +414,14 @@ static void cyberjack_write_bulk_callback (struct urb *urb) | |||
411 | { | 414 | { |
412 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 415 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; |
413 | struct cyberjack_private *priv = usb_get_serial_port_data(port); | 416 | struct cyberjack_private *priv = usb_get_serial_port_data(port); |
417 | int status = urb->status; | ||
414 | 418 | ||
415 | dbg("%s - port %d", __FUNCTION__, port->number); | 419 | dbg("%s - port %d", __FUNCTION__, port->number); |
416 | 420 | ||
417 | port->write_urb_busy = 0; | 421 | port->write_urb_busy = 0; |
418 | if (urb->status) { | 422 | if (status) { |
419 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); | 423 | dbg("%s - nonzero write bulk status received: %d", |
424 | __FUNCTION__, status); | ||
420 | return; | 425 | return; |
421 | } | 426 | } |
422 | 427 | ||