aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-01-15 14:50:02 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 13:37:12 -0500
commit80f745fb1b0fb11383cbb8df2c36aaaa0399b6e6 (patch)
tree4b8f1c9d98f97bec839c95d0498259af8b8627c5 /drivers
parent4b315627e6b894156e235ac905786e7d46aab2e6 (diff)
USB: add the sysfs driver name to all modules
This adds the module name to all USB drivers, if they are built into the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/ Cc: Kay Sievers <kay.sievers@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index d6eb5ce1dd1d..d505926aa9cc 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -750,7 +750,8 @@ EXPORT_SYMBOL_GPL(usb_deregister_device_driver);
750 * usb_register_dev() to enable that functionality. This function no longer 750 * usb_register_dev() to enable that functionality. This function no longer
751 * takes care of that. 751 * takes care of that.
752 */ 752 */
753int usb_register_driver(struct usb_driver *new_driver, struct module *owner) 753int usb_register_driver(struct usb_driver *new_driver, struct module *owner,
754 const char *mod_name)
754{ 755{
755 int retval = 0; 756 int retval = 0;
756 757
@@ -763,6 +764,7 @@ int usb_register_driver(struct usb_driver *new_driver, struct module *owner)
763 new_driver->drvwrap.driver.probe = usb_probe_interface; 764 new_driver->drvwrap.driver.probe = usb_probe_interface;
764 new_driver->drvwrap.driver.remove = usb_unbind_interface; 765 new_driver->drvwrap.driver.remove = usb_unbind_interface;
765 new_driver->drvwrap.driver.owner = owner; 766 new_driver->drvwrap.driver.owner = owner;
767 new_driver->drvwrap.driver.mod_name = mod_name;
766 spin_lock_init(&new_driver->dynids.lock); 768 spin_lock_init(&new_driver->dynids.lock);
767 INIT_LIST_HEAD(&new_driver->dynids.list); 769 INIT_LIST_HEAD(&new_driver->dynids.list);
768 770