Skip to contentSkip to conversation

convert away from urb->status in xpad driver

PATCH In review Oliver Neukum 4 participants 4 messages Apr 3, 2008 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

drivers/input/joystick/xpad.c +12 -8
@@ -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;
 	}
 
Acked-by
#2 lore raw
In reply to a message not in the archive

[ added Dmitry ]

Quoted 4 lines · Oliver Neukum

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.

FWIW

Signature · 6 lines
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by
#3 lore raw
Quoted 4 lines · Jiri Kosina

[ added Dmitry ]

On Thu, 3 Apr 2008, Oliver Neukum wrote:

Quoted 9 lines
Quoted 4 lines

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.

FWIW

I think it would be better if this patch come through USB tree so there are no merge dependencies. I will carry a local copy of this patch so I don't merge something that may screw it up.

Signature · 1 line
Dmitry
#5 lore raw
In reply to a message not in the archive
Quoted 12 lines · Dmitry Torokhov
Quoted 11 lines · Jiri Kosina

[ added Dmitry ]

Quoted 4 lines · Oliver Neukum

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.

FWIW

Quoted 8 lines
Quoted 2 lines

I think it would be better if this patch come through USB tree so there are no merge dependencies. I will carry a local copy of this patch so I don't merge something that may screw it up.

Ok, I can do that.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html