linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]convert away from urb->status in xpad driver
@ 2008-04-03 11:25 Oliver Neukum
       [not found] ` <200804031326.00717.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2008-04-03 11:25 UTC (permalink / raw)
  To: jikos, linux-input, linux-usb, honza

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.

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] 4+ messages in thread

* Re: [patch]convert away from urb->status in xpad driver
       [not found] ` <200804031326.00717.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
@ 2008-04-03 15:49   ` Jiri Kosina
  2008-04-03 19:41     ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Jiri Kosina @ 2008-04-03 15:49 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: jikos-AlSwsSmVLrQ, Dmitry Torokhov,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Jan Kratochvil

[ added Dmitry ]

On Thu, 3 Apr 2008, Oliver Neukum wrote:

> 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.
> Signed-off-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>

FWIW

Acked-by: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch]convert away from urb->status in xpad driver
  2008-04-03 15:49   ` Jiri Kosina
@ 2008-04-03 19:41     ` Dmitry Torokhov
       [not found]       ` <20080403153901.ZZRA012-NG0XCrj25/nJrYCpivWRnl5pS2h4L8biXqFh9Ls21Oc@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2008-04-03 19:41 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: Oliver Neukum, jikos, linux-input, linux-usb, Jan Kratochvil

On Thu, Apr 03, 2008 at 05:49:54PM +0200, Jiri Kosina wrote:
> [ added Dmitry ]
> 
> On Thu, 3 Apr 2008, Oliver Neukum wrote:
> 
> > 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.
> > Signed-off-by: Oliver Neukum <oneukum@suse.de>
> 
> FWIW
> 
> Acked-by: Jiri Kosina <jkosina@suse.cz>
> 

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.

Acked-by: Dmitry Torokhov <dtor@mail.ru>

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch]convert away from urb->status in xpad driver
       [not found]       ` <20080403153901.ZZRA012-NG0XCrj25/nJrYCpivWRnl5pS2h4L8biXqFh9Ls21Oc@public.gmane.org>
@ 2008-04-03 20:26         ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2008-04-03 20:26 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Jiri Kosina, Oliver Neukum, jikos-AlSwsSmVLrQ,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Jan Kratochvil

On Thu, Apr 03, 2008 at 03:41:54PM -0400, Dmitry Torokhov wrote:
> On Thu, Apr 03, 2008 at 05:49:54PM +0200, Jiri Kosina wrote:
> > [ added Dmitry ]
> > 
> > On Thu, 3 Apr 2008, Oliver Neukum wrote:
> > 
> > > 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.
> > > Signed-off-by: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
> > 
> > FWIW
> > 
> > Acked-by: Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>
> > 
> 
> 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.
> 
> Acked-by: Dmitry Torokhov <dtor-JGs/UdohzUI@public.gmane.org>

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-03 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 11:25 [patch]convert away from urb->status in xpad driver Oliver Neukum
     [not found] ` <200804031326.00717.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2008-04-03 15:49   ` Jiri Kosina
2008-04-03 19:41     ` Dmitry Torokhov
     [not found]       ` <20080403153901.ZZRA012-NG0XCrj25/nJrYCpivWRnl5pS2h4L8biXqFh9Ls21Oc@public.gmane.org>
2008-04-03 20:26         ` Greg KH

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).