* [patch]convert away from urb->status in xpad driver #2
@ 2008-04-03 19:40 Oliver Neukum
0 siblings, 0 replies; only message in thread
From: Oliver Neukum @ 2008-04-03 19:40 UTC (permalink / raw)
To: jikos, linux-input, linux-usb, honza, Greg KH
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>
---
--- linux-2.6.25-rc7-vanilla/drivers/input/joystick/xpad.c 2008-03-31 15:20:58.000000000 +0200
+++ linux-2.6.25-rc7-work/drivers/input/joystick/xpad.c 2008-04-03 13:05:26.000000000 +0200
@@ -339,9 +339,11 @@ static void xpad360_process_packet(struc
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-04-03 19:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 19:40 [patch]convert away from urb->status in xpad driver #2 Oliver Neukum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).