diff options
-rw-r--r-- | drivers/usb/core/driver.c | 4 | ||||
-rw-r--r-- | include/linux/usb.h | 5 |
2 files changed, 6 insertions, 3 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 | */ |
753 | int usb_register_driver(struct usb_driver *new_driver, struct module *owner) | 753 | int 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 | ||
diff --git a/include/linux/usb.h b/include/linux/usb.h index aab5b1b72021..733f38de4978 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -868,10 +868,11 @@ struct usb_class_driver { | |||
868 | * use these in module_init()/module_exit() | 868 | * use these in module_init()/module_exit() |
869 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 869 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
870 | */ | 870 | */ |
871 | extern int usb_register_driver(struct usb_driver *, struct module *); | 871 | extern int usb_register_driver(struct usb_driver *, struct module *, |
872 | const char *); | ||
872 | static inline int usb_register(struct usb_driver *driver) | 873 | static inline int usb_register(struct usb_driver *driver) |
873 | { | 874 | { |
874 | return usb_register_driver(driver, THIS_MODULE); | 875 | return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
875 | } | 876 | } |
876 | extern void usb_deregister(struct usb_driver *); | 877 | extern void usb_deregister(struct usb_driver *); |
877 | 878 | ||