diff options
author | Oliver Neukum <oliver@neukum.org> | 2008-04-03 21:40:59 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-04-24 21:16:47 -0700 |
commit | 6fc88f53aaa4ff8ee621353ac27269b4a656d721 (patch) | |
tree | 3205c80c2c536a581a7327384b234f7c83032602 /drivers/input | |
parent | 0d22f65515307c878ddd20b1305cce925ca9516c (diff) | |
download | linux-3.10-6fc88f53aaa4ff8ee621353ac27269b4a656d721.tar.gz linux-3.10-6fc88f53aaa4ff8ee621353ac27269b4a656d721.tar.bz2 linux-3.10-6fc88f53aaa4ff8ee621353ac27269b4a656d721.zip |
USB: convert away from urb->status in xpad driver
USB is moving to transfering status as a parameter. To ease the transition
urb->status is to be touched only once in a function. The xpad driver has
been overlooked. Dmitry wants this to go through the USB tree.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/joystick/xpad.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 0380597249b..2854c8fc334 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -339,9 +339,11 @@ static void xpad360_process_packet(struct usb_xpad *xpad, static void xpad_irq_in(struct urb *urb) { struct usb_xpad *xpad = urb->context; - int retval; + int retval, status; - switch (urb->status) { + status = urb->status; + + switch (status) { case 0: /* success */ break; @@ -350,11 +352,11 @@ static void xpad_irq_in(struct urb *urb) case -ESHUTDOWN: /* this urb is terminated, clean up */ dbg("%s - urb shutting down with status: %d", - __FUNCTION__, urb->status); + __FUNCTION__, status); return; default: dbg("%s - nonzero urb status received: %d", - __FUNCTION__, urb->status); + __FUNCTION__, status); goto exit; } @@ -373,9 +375,11 @@ exit: #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) static void xpad_irq_out(struct urb *urb) { - int retval; + int retval, status; + + status = urb->status; - switch (urb->status) { + switch (status) { case 0: /* success */ break; @@ -384,11 +388,11 @@ static void xpad_irq_out(struct urb *urb) case -ESHUTDOWN: /* this urb is terminated, clean up */ dbg("%s - urb shutting down with status: %d", - __FUNCTION__, urb->status); + __FUNCTION__, status); return; default: dbg("%s - nonzero urb status received: %d", - __FUNCTION__, urb->status); + __FUNCTION__, status); goto exit; } |