]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/input/joystick/xpad.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
[karo-tx-linux.git] / drivers / input / joystick / xpad.c
index 52ddb04644abaebd5a71af2d8583ec70bdde583d..4b07bdadb81e16d9f7f0392ee6a942a81de0c78b 100644 (file)
@@ -405,9 +405,11 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha
 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;
@@ -416,11 +418,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;
        }
 
@@ -445,9 +447,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;
 
-       switch (urb->status) {
+       status = urb->status;
+
+       switch (status) {
                case 0:
                /* success */
                break;
@@ -456,11 +460,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;
        }