On Thu, 4 May 2000, John McDonnell wrote:
> morning all..
Hello!
> with a SmartUPS 700:
> May 4 09:34:50 gemini kernel: input3: USB HID v1.00 Joystick
...
> with a BackUPS Pro 350:
> May 4 10:02:17 gemini kernel: input3: USB HID v1.00 Joystick
> in both cases, it seems to think I have a joystick attached.
It doesn't think so, but prints it. hid.c doen't check the usage-page of
the application usage. A patch is included as an attachment.
hid.c contains lot of code which should be better moved to an other
module, because hid is more than keyboards, digitizers and joysticks...
> john.
Philipp
--
/ / (_)__ __ ____ __ Philipp Hahn
/ /__/ / _ \/ // /\ \/ /
/____/_/_//_/\_,_/ /_/\_\ [EMAIL PROTECTED]
--- linux-2.3.99/drivers/usb/hid.c.orig Sat May 6 18:34:47 2000
+++ linux-2.3.99/drivers/usb/hid.c Sat May 6 18:54:04 2000
@@ -1429,9 +1429,9 @@
hid_init_input(hid);
input_register_device(&hid->input);
- printk(KERN_INFO "input%d: USB HID v%x.%02x %s\n",
+ printk(KERN_INFO "hid%d: USB HID v%x.%02x %s\n",
hid->input.number, hid->version >> 8, hid->version & 0xff,
- (hid->application & 0xffff) <= 8 ? hid_name[hid->application & 0xffff]
: "device");
+ ((hid->application >= 0x00010000) && (hid->application <= 0x00010008))
+? hid_name[hid->application & 0xffff] : "device");
return hid;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]