ChangeSet 1.1000, 2003/02/20 11:12:14-08:00, johannes@erdfelt.com [PATCH] usb_get_driver_np() gives wrong driver name (usb_mouse) 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". diff -Nru a/drivers/usb/usbkbd.c b/drivers/usb/usbkbd.c --- a/drivers/usb/usbkbd.c Thu Feb 20 12:06:58 2003 +++ b/drivers/usb/usbkbd.c Thu Feb 20 12:06:58 2003 @@ -272,7 +272,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/usbmouse.c b/drivers/usb/usbmouse.c --- a/drivers/usb/usbmouse.c Thu Feb 20 12:06:58 2003 +++ b/drivers/usb/usbmouse.c Thu Feb 20 12:06:58 2003 @@ -188,7 +188,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,