On Sun, Sep 16, 2001 at 12:09:40PM +0200, Philipp Matthias Hahn wrote:
> Hello LKML, USB-ML, Vojtech!
> 
> The initialization order of hid.o and hiddev.o is wrong:
> 
> drivers/usb/hiddev.c:573 hiddev_connect() is called by
> drivers/usb/hid-core.c:1225 hid_probe() before
> drivers/usb/hiddev.c:665 hiddev_init() is called.
> 
> This results in hiddev_devfs_handle being NULL for each hid-device handled
> by hiddev, so that all device-nodes are created as /dev/hiddev%d instead
> of /dev/usb/hid/hiddev%d.

And here goes the fix. It also fixes a problem with devices with HID
type interface with no endpoints. Alan, Linus, please apply it. 

--- linux-2.4.9-ac10/drivers/usb/hid-core.c     Mon Sep 10 10:10:16 2001
+++ linux/drivers/usb/hid-core.c        Sun Sep 16 12:25:01 2001
@@ -1281,10 +1281,10 @@
 
 static int __init hid_init(void)
 {
-       usb_register(&hid_driver);
 #ifdef CONFIG_USB_HIDDEV
        hiddev_init();
 #endif
+       usb_register(&hid_driver);
        info(DRIVER_VERSION " " DRIVER_AUTHOR);
 

-- 
Vojtech Pavlik
SuSE Labs

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to