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 | 335202f44a9a68902a80e09ba33aa4eaddc9c8ed (patch) | |
tree | df05b491609ffe37a8528c77a55f2f411f604794 /drivers/usb | |
parent | 85d75107117eca0e29ac3da8cb82b45f9cd3a7fa (diff) |
USB: serial: empeg: 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')
-rw-r--r-- | drivers/usb/serial/empeg.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index 4703c8f85383..050fcc996f56 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c | |||
@@ -326,12 +326,14 @@ static int empeg_chars_in_buffer (struct usb_serial_port *port) | |||
326 | 326 | ||
327 | static void empeg_write_bulk_callback (struct urb *urb) | 327 | static void empeg_write_bulk_callback (struct urb *urb) |
328 | { | 328 | { |
329 | struct usb_serial_port *port = (struct usb_serial_port *)urb->context; | 329 | struct usb_serial_port *port = urb->context; |
330 | int status = urb->status; | ||
330 | 331 | ||
331 | dbg("%s - port %d", __FUNCTION__, port->number); | 332 | dbg("%s - port %d", __FUNCTION__, port->number); |
332 | 333 | ||
333 | if (urb->status) { | 334 | if (status) { |
334 | dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); | 335 | dbg("%s - nonzero write bulk status received: %d", |
336 | __FUNCTION__, status); | ||
335 | return; | 337 | return; |
336 | } | 338 | } |
337 | 339 | ||
@@ -345,11 +347,13 @@ static void empeg_read_bulk_callback (struct urb *urb) | |||
345 | struct tty_struct *tty; | 347 | struct tty_struct *tty; |
346 | unsigned char *data = urb->transfer_buffer; | 348 | unsigned char *data = urb->transfer_buffer; |
347 | int result; | 349 | int result; |
350 | int status = urb->status; | ||
348 | 351 | ||
349 | dbg("%s - port %d", __FUNCTION__, port->number); | 352 | dbg("%s - port %d", __FUNCTION__, port->number); |
350 | 353 | ||
351 | if (urb->status) { | 354 | if (status) { |
352 | dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); | 355 | dbg("%s - nonzero read bulk status received: %d", |
356 | __FUNCTION__, status); | ||
353 | return; | 357 | return; |
354 | } | 358 | } |
355 | 359 | ||