diff options
Diffstat (limited to 'drivers/input/joystick/xpad.c')
-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 52ddb04644ab..4b07bdadb81e 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -405,9 +405,11 @@ static void xpad360w_process_packet(struct usb_xpad *xpad, u16 cmd, unsigned cha | |||
405 | static void xpad_irq_in(struct urb *urb) | 405 | static void xpad_irq_in(struct urb *urb) |
406 | { | 406 | { |
407 | struct usb_xpad *xpad = urb->context; | 407 | struct usb_xpad *xpad = urb->context; |
408 | int retval; | 408 | int retval, status; |
409 | 409 | ||
410 | switch (urb->status) { | 410 | status = urb->status; |
411 | |||
412 | switch (status) { | ||
411 | case 0: | 413 | case 0: |
412 | /* success */ | 414 | /* success */ |
413 | break; | 415 | break; |
@@ -416,11 +418,11 @@ static void xpad_irq_in(struct urb *urb) | |||
416 | case -ESHUTDOWN: | 418 | case -ESHUTDOWN: |
417 | /* this urb is terminated, clean up */ | 419 | /* this urb is terminated, clean up */ |
418 | dbg("%s - urb shutting down with status: %d", | 420 | dbg("%s - urb shutting down with status: %d", |
419 | __FUNCTION__, urb->status); | 421 | __FUNCTION__, status); |
420 | return; | 422 | return; |
421 | default: | 423 | default: |
422 | dbg("%s - nonzero urb status received: %d", | 424 | dbg("%s - nonzero urb status received: %d", |
423 | __FUNCTION__, urb->status); | 425 | __FUNCTION__, status); |
424 | goto exit; | 426 | goto exit; |
425 | } | 427 | } |
426 | 428 | ||
@@ -445,9 +447,11 @@ exit: | |||
445 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) | 447 | #if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) |
446 | static void xpad_irq_out(struct urb *urb) | 448 | static void xpad_irq_out(struct urb *urb) |
447 | { | 449 | { |
448 | int retval; | 450 | int retval, status; |
449 | 451 | ||
450 | switch (urb->status) { | 452 | status = urb->status; |
453 | |||
454 | switch (status) { | ||
451 | case 0: | 455 | case 0: |
452 | /* success */ | 456 | /* success */ |
453 | break; | 457 | break; |
@@ -456,11 +460,11 @@ static void xpad_irq_out(struct urb *urb) | |||
456 | case -ESHUTDOWN: | 460 | case -ESHUTDOWN: |
457 | /* this urb is terminated, clean up */ | 461 | /* this urb is terminated, clean up */ |
458 | dbg("%s - urb shutting down with status: %d", | 462 | dbg("%s - urb shutting down with status: %d", |
459 | __FUNCTION__, urb->status); | 463 | __FUNCTION__, status); |
460 | return; | 464 | return; |
461 | default: | 465 | default: |
462 | dbg("%s - nonzero urb status received: %d", | 466 | dbg("%s - nonzero urb status received: %d", |
463 | __FUNCTION__, urb->status); | 467 | __FUNCTION__, status); |
464 | goto exit; | 468 | goto exit; |
465 | } | 469 | } |
466 | 470 | ||