aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ir-usb.c
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:33 -0400
commit3152b74f92048223263c54383b3639a2939d853a (patch)
tree44ab99b64f03954efda3a4db639a812b1956ec43 /drivers/usb/serial/ir-usb.c
parentb4a1579772667f9ebc0c9e26ed0b674966085e85 (diff)
USB: serial: ir-usb: 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: Gary Brubaker <xavyer@ix.netcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/ir-usb.c')
-rw-r--r--drivers/usb/serial/ir-usb.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 9d847f69291c..8cec5e520d95 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -392,12 +392,14 @@ static int ir_write (struct usb_serial_port *port, const unsigned char *buf, int
392static void ir_write_bulk_callback (struct urb *urb) 392static void ir_write_bulk_callback (struct urb *urb)
393{ 393{
394 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 394 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
395 int status = urb->status;
395 396
396 dbg("%s - port %d", __FUNCTION__, port->number); 397 dbg("%s - port %d", __FUNCTION__, port->number);
397 398
398 port->write_urb_busy = 0; 399 port->write_urb_busy = 0;
399 if (urb->status) { 400 if (status) {
400 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 401 dbg("%s - nonzero write bulk status received: %d",
402 __FUNCTION__, status);
401 return; 403 return;
402 } 404 }
403 405
@@ -417,6 +419,7 @@ static void ir_read_bulk_callback (struct urb *urb)
417 struct tty_struct *tty; 419 struct tty_struct *tty;
418 unsigned char *data = urb->transfer_buffer; 420 unsigned char *data = urb->transfer_buffer;
419 int result; 421 int result;
422 int status = urb->status;
420 423
421 dbg("%s - port %d", __FUNCTION__, port->number); 424 dbg("%s - port %d", __FUNCTION__, port->number);
422 425
@@ -425,8 +428,7 @@ static void ir_read_bulk_callback (struct urb *urb)
425 return; 428 return;
426 } 429 }
427 430
428 switch (urb->status) { 431 switch (status) {
429
430 case 0: /* Successful */ 432 case 0: /* Successful */
431 433
432 /* 434 /*
@@ -490,7 +492,7 @@ static void ir_read_bulk_callback (struct urb *urb)
490 default: 492 default:
491 dbg("%s - nonzero read bulk status received: %d", 493 dbg("%s - nonzero read bulk status received: %d",
492 __FUNCTION__, 494 __FUNCTION__,
493 urb->status); 495 status);
494 break ; 496 break ;
495 497
496 } 498 }