diff options
author | Tilman Schmidt <tilman@imap.cc> | 2008-02-06 04:38:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:11 -0500 |
commit | dbd9823121b4e369bc414be75e12b4f6c84c52c0 (patch) | |
tree | 60bda272d600d4b2836e5694acc38d92c05af634 /drivers/isdn/gigaset/usb-gigaset.c | |
parent | f47cd9b553aaada602449204513b5a5b29cba263 (diff) |
gigaset: clean up urb->status usage
Make there only be one reference to urb->status per URB callback, and none
outside, in preparation for removal of that field.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Greg KH <gregkh@suse.de>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/gigaset/usb-gigaset.c')
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index ca4bee173cfb..0bd5d4ba11cd 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -361,13 +361,14 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
361 | { | 361 | { |
362 | struct inbuf_t *inbuf = urb->context; | 362 | struct inbuf_t *inbuf = urb->context; |
363 | struct cardstate *cs = inbuf->cs; | 363 | struct cardstate *cs = inbuf->cs; |
364 | int status = urb->status; | ||
364 | int resubmit = 0; | 365 | int resubmit = 0; |
365 | int r; | 366 | int r; |
366 | unsigned numbytes; | 367 | unsigned numbytes; |
367 | unsigned char *src; | 368 | unsigned char *src; |
368 | unsigned long flags; | 369 | unsigned long flags; |
369 | 370 | ||
370 | if (!urb->status) { | 371 | if (!status) { |
371 | if (!cs->connected) { | 372 | if (!cs->connected) { |
372 | err("%s: disconnected", __func__); /* should never happen */ | 373 | err("%s: disconnected", __func__); /* should never happen */ |
373 | return; | 374 | return; |
@@ -393,8 +394,8 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
393 | } else { | 394 | } else { |
394 | /* The urb might have been killed. */ | 395 | /* The urb might have been killed. */ |
395 | gig_dbg(DEBUG_ANY, "%s - nonzero read bulk status received: %d", | 396 | gig_dbg(DEBUG_ANY, "%s - nonzero read bulk status received: %d", |
396 | __func__, urb->status); | 397 | __func__, status); |
397 | if (urb->status != -ENOENT) { /* not killed */ | 398 | if (status != -ENOENT) { /* not killed */ |
398 | if (!cs->connected) { | 399 | if (!cs->connected) { |
399 | err("%s: disconnected", __func__); /* should never happen */ | 400 | err("%s: disconnected", __func__); /* should never happen */ |
400 | return; | 401 | return; |
@@ -418,11 +419,12 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
418 | static void gigaset_write_bulk_callback(struct urb *urb) | 419 | static void gigaset_write_bulk_callback(struct urb *urb) |
419 | { | 420 | { |
420 | struct cardstate *cs = urb->context; | 421 | struct cardstate *cs = urb->context; |
422 | int status = urb->status; | ||
421 | unsigned long flags; | 423 | unsigned long flags; |
422 | 424 | ||
423 | if (urb->status) | 425 | if (status) |
424 | dev_err(cs->dev, "bulk transfer failed (status %d)\n", | 426 | dev_err(cs->dev, "bulk transfer failed (status %d)\n", |
425 | -urb->status); | 427 | -status); |
426 | /* That's all we can do. Communication problems | 428 | /* That's all we can do. Communication problems |
427 | are handled by timeouts or network protocols. */ | 429 | are handled by timeouts or network protocols. */ |
428 | 430 | ||