mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.25: IFORCE joystick code buglets
@ 2002-07-08 12:54 Bob_Tracy
  0 siblings, 0 replies; only message in thread
From: Bob_Tracy @ 2002-07-08 12:54 UTC (permalink / raw)
  To: linux-kernel

I'll include the following patches in-line since they are both small
and obvious.  For what it's worth, I wouldn't have found the first bug
if the second hadn't existed :-).


====--CUT HERE--====
--- linux/drivers/input/joystick/iforce/iforce-packets.c.orig	Sun Jul  7 20:42:42 2002
+++ linux/drivers/input/joystick/iforce/iforce-packets.c	Sun Jul  7 20:45:28 2002
@@ -249,9 +249,8 @@
 
 	switch (iforce->bus) {
 
-	case IFORCE_USB:
-
 #ifdef IFORCE_USB
+	case IFORCE_USB:
 		iforce->cr.bRequest = packet[0];
 		iforce->ctrl->dev = iforce->usbdev;
 
@@ -274,14 +273,11 @@
 			usb_unlink_urb(iforce->ctrl);
 			return -1;
 		}
-#else
-		printk(KERN_ERR "iforce_get_id_packet: iforce->bus = USB!\n");
-#endif
 		break;
-
-	case IFORCE_232: +#endif
 
 #ifdef IFORCE_232
+	case IFORCE_232:
 		iforce->expect_packet = FF_CMD_QUERY;
 		iforce_send_packet(iforce, FF_CMD_QUERY, packet);
 
@@ -298,10 +294,8 @@
 			iforce->expect_packet = 0;
 			return -1;
 		}
-#else
-		printk(KERN_ERR "iforce_get_id_packet: iforce->bus = SERIO!\n");
-#endif
 		break;
+#endif
 
 	default:
 		printk(KERN_ERR "iforce_get_id_packet: iforce->bus = %d\n",
====--TUC EREH--====

====--CUT HERE--====
--- linux/drivers/input/joystick/iforce/iforce.h.orig	Sun Jul  7 15:18:26 2002
+++ linux/drivers/input/joystick/iforce/iforce.h	Sun Jul  7 16:35:43 2002
@@ -47,10 +47,10 @@
 
 #define IFORCE_MAX_LENGTH	16
 
-#if defined(CONFIG_JOYSTICK_IFORCE_232)
+#if defined(CONFIG_JOYSTICK_IFORCE_232) || defined(CONFIG_JOYSTICK_IFORCE_232_MODULE)
 #define IFORCE_232	1
 #endif
-#if defined(CONFIG_JOYSTICK_IFORCE_USB)
+#if defined(CONFIG_JOYSTICK_IFORCE_USB) || defined(CONFIG_JOYSTICK_IFORCE_USB_MODULE)
 #define IFORCE_USB	2
 #endif
 
====--TUC EREH--====

-- 
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
rct@frus.com
-----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-07-08 12:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-08 12:54 [PATCH] 2.5.25: IFORCE joystick code buglets Bob_Tracy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®