ChangeSet 1.925.62.7, 2003/02/07 17:21:51+11:00, johannes@erdfelt.com [PATCH] usb_get_driver_np() gives wrong driver name (usb_mouse) On Thu, Feb 06, 2003, Johannes Erdfelt wrote: > On Thu, Feb 06, 2003, Boris Duerner wrote: > > I use the usb_get_driver_np() function to get the name of the loaded driver > > for a usb device and I found that for a device using the usbmouse module the > > wrong driver name is returned. It gives me "usb_mouse" instead of usbmouse. > > the driver name is also wrong in /proc/bus/usb/drivers but correct in lsmod > > or /proc/modules resp. > > The driver name in /proc/bus/usb/drivers is given differently than from > /proc/modules. > > I'm not exactly sure why the names are seperate, but it leads to > situations like this where the names won't match for seemingly no good > reason. The usbkbd driver was even worse, giving it's name as "keyboard". And the 2.5 patch. diff -Nru a/drivers/usb/input/usbkbd.c b/drivers/usb/input/usbkbd.c --- a/drivers/usb/input/usbkbd.c Tue Feb 18 16:45:04 2003 +++ b/drivers/usb/input/usbkbd.c Tue Feb 18 16:45:04 2003 @@ -353,7 +353,7 @@ MODULE_DEVICE_TABLE (usb, usb_kbd_id_table); static struct usb_driver usb_kbd_driver = { - .name = "keyboard", + .name = "usbkbd", .probe = usb_kbd_probe, .disconnect = usb_kbd_disconnect, .id_table = usb_kbd_id_table, diff -Nru a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c --- a/drivers/usb/input/usbmouse.c Tue Feb 18 16:45:04 2003 +++ b/drivers/usb/input/usbmouse.c Tue Feb 18 16:45:04 2003 @@ -237,7 +237,7 @@ MODULE_DEVICE_TABLE (usb, usb_mouse_id_table); static struct usb_driver usb_mouse_driver = { - .name = "usb_mouse", + .name = "usbmouse", .probe = usb_mouse_probe, .disconnect = usb_mouse_disconnect, .id_table = usb_mouse_id_table,