summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/usb-gigaset.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2008-02-06 10:38:23 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 19:41:11 +0100
commitdbd9823121b4e369bc414be75e12b4f6c84c52c0 (patch)
tree60bda272d600d4b2836e5694acc38d92c05af634 /drivers/isdn/gigaset/usb-gigaset.c
parentkprobes: kretprobe user entry-handler (diff)
downloadlinux-dbd9823121b4e369bc414be75e12b4f6c84c52c0.tar.xz
linux-dbd9823121b4e369bc414be75e12b4f6c84c52c0.zip
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.c12
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)
{
struct inbuf_t *inbuf = urb->context;
struct cardstate *cs = inbuf->cs;
+ int status = urb->status;
int resubmit = 0;
int r;
unsigned numbytes;
unsigned char *src;
unsigned long flags;
- if (!urb->status) {
+ if (!status) {
if (!cs->connected) {
err("%s: disconnected", __func__); /* should never happen */
return;
@@ -393,8 +394,8 @@ static void gigaset_read_int_callback(struct urb *urb)
} else {
/* The urb might have been killed. */
gig_dbg(DEBUG_ANY, "%s - nonzero read bulk status received: %d",
- __func__, urb->status);
- if (urb->status != -ENOENT) { /* not killed */
+ __func__, status);
+ if (status != -ENOENT) { /* not killed */
if (!cs->connected) {
err("%s: disconnected", __func__); /* should never happen */
return;
@@ -418,11 +419,12 @@ static void gigaset_read_int_callback(struct urb *urb)
static void gigaset_write_bulk_callback(struct urb *urb)
{
struct cardstate *cs = urb->context;
+ int status = urb->status;
unsigned long flags;
- if (urb->status)
+ if (status)
dev_err(cs->dev, "bulk transfer failed (status %d)\n",
- -urb->status);
+ -status);
/* That's all we can do. Communication problems
are handled by timeouts or network protocols. */