Skip to contentSkip to conversation

2.5.25: IFORCE joystick code buglets

PATCH New Bob_Tracy 1 participant 1 message Jul 8, 2002 Input drivers

lore
Share & tools
lore

Bob_Tracy

author
#0 lore raw

PATCH 1/1 2.5.25: IFORCE joystick code buglets

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--====

drivers/input/joystick/iforce/iforce-packets.c renamed from drivers/input/joystick/iforce/iforce-packets.c.orig +3 -10
@@ -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--====

drivers/input/joystick/iforce/iforce.h renamed from drivers/input/joystick/iforce/iforce.h.orig +2 -2
@@ -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--====

Signature · 4 lines
-----------------------------------------------------------------------
Bob Tracy                   WTO + WIPO = DMCA? http://www.anti-dmca.org
[email protected]
-----------------------------------------------------------------------