aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2008-04-03 15:40:59 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:47 -0400
commit6fc88f53aaa4ff8ee621353ac27269b4a656d721 (patch)
tree3205c80c2c536a581a7327384b234f7c83032602 /drivers/input
parent0d22f65515307c878ddd20b1305cce925ca9516c (diff)
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.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 0380597249bb..2854c8fc334b 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,
339static void xpad_irq_in(struct urb *urb) 339static void xpad_irq_in(struct urb *urb)
340{ 340{
341 struct usb_xpad *xpad = urb->context; 341 struct usb_xpad *xpad = urb->context;
342 int retval; 342 int retval, status;
343 343
344 switch (urb->status) { 344 status = urb->status;
345
346 switch (status) {
345 case 0: 347 case 0:
346 /* success */ 348 /* success */
347 break; 349 break;
@@ -350,11 +352,11 @@ static void xpad_irq_in(struct urb *urb)
350 case -ESHUTDOWN: 352 case -ESHUTDOWN:
351 /* this urb is terminated, clean up */ 353 /* this urb is terminated, clean up */
352 dbg("%s - urb shutting down with status: %d", 354 dbg("%s - urb shutting down with status: %d",
353 __FUNCTION__, urb->status); 355 __FUNCTION__, status);
354 return; 356 return;
355 default: 357 default:
356 dbg("%s - nonzero urb status received: %d", 358 dbg("%s - nonzero urb status received: %d",
357 __FUNCTION__, urb->status); 359 __FUNCTION__, status);
358 goto exit; 360 goto exit;
359 } 361 }
360 362
@@ -373,9 +375,11 @@ exit:
373#if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS) 375#if defined(CONFIG_JOYSTICK_XPAD_FF) || defined(CONFIG_JOYSTICK_XPAD_LEDS)
374static void xpad_irq_out(struct urb *urb) 376static void xpad_irq_out(struct urb *urb)
375{ 377{
376 int retval; 378 int retval, status;
379
380 status = urb->status;
377 381
378 switch (urb->status) { 382 switch (status) {
379 case 0: 383 case 0:
380 /* success */ 384 /* success */
381 break; 385 break;
@@ -384,11 +388,11 @@ static void xpad_irq_out(struct urb *urb)
384 case -ESHUTDOWN: 388 case -ESHUTDOWN:
385 /* this urb is terminated, clean up */ 389 /* this urb is terminated, clean up */
386 dbg("%s - urb shutting down with status: %d", 390 dbg("%s - urb shutting down with status: %d",
387 __FUNCTION__, urb->status); 391 __FUNCTION__, status);
388 return; 392 return;
389 default: 393 default:
390 dbg("%s - nonzero urb status received: %d", 394 dbg("%s - nonzero urb status received: %d",
391 __FUNCTION__, urb->status); 395 __FUNCTION__, status);
392 goto exit; 396 goto exit;
393 } 397 }
394 398