From 87eda594c45396d0498316bb097bc6f2e480557a Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Thu, 3 Apr 2008 21:40:59 +0200 Subject: [PATCH] --- yaml --- r: 93340 b: refs/heads/master c: 6fc88f53aaa4ff8ee621353ac27269b4a656d721 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/input/joystick/xpad.c | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 9f9ecc2567b6..a1f33f867a6b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0d22f65515307c878ddd20b1305cce925ca9516c +refs/heads/master: 6fc88f53aaa4ff8ee621353ac27269b4a656d721 diff --git a/trunk/drivers/input/joystick/xpad.c b/trunk/drivers/input/joystick/xpad.c index 0380597249bb..2854c8fc334b 100644 --- a/trunk/drivers/input/joystick/xpad.c +++ b/trunk/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 @@ static void xpad_irq_in(struct urb *urb) #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; }