diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-11-21 17:53:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-04 16:48:32 -0500 |
commit | 2143acc6dc79bdbff812f02a7dc5ab9d4fc81fc8 (patch) | |
tree | 523c2d57e412766bfc37b9ff6c22ff01108c92a5 /include/linux/usb.h | |
parent | ba9dc657af86d05d2971633e57d1f6f94ed60472 (diff) |
[PATCH] USB: make registering a usb driver automatically set the module owner
This fixes the driver that forgot to set the module owner up. Now we
can remove the unneeded pointer from the usb driver structure. The idea
for how to do this was from Al Viro, who did this for the PCI drivers.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 8d5829936bc4..3d05c63451a8 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -625,7 +625,11 @@ struct usb_class_driver { | |||
625 | * use these in module_init()/module_exit() | 625 | * use these in module_init()/module_exit() |
626 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 626 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
627 | */ | 627 | */ |
628 | extern int usb_register(struct usb_driver *); | 628 | int usb_register_driver(struct usb_driver *, struct module *); |
629 | static inline int usb_register(struct usb_driver *driver) | ||
630 | { | ||
631 | return usb_register_driver(driver, THIS_MODULE); | ||
632 | } | ||
629 | extern void usb_deregister(struct usb_driver *); | 633 | extern void usb_deregister(struct usb_driver *); |
630 | 634 | ||
631 | extern int usb_register_dev(struct usb_interface *intf, | 635 | extern int usb_register_dev(struct usb_interface *intf, |