diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 20:50:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 20:50:10 +0200 |
commit | 4601de807d7755aabd35faf5e15ae233241b8582 (patch) | |
tree | b7cc0cd47b16fbc89d3d222577e8ee403030cfbe /drivers | |
parent | usb: storage: Convert US_DEBUGP to usb_stor_dbg (diff) | |
download | linux-4601de807d7755aabd35faf5e15ae233241b8582.tar.xz linux-4601de807d7755aabd35faf5e15ae233241b8582.zip |
USB: storage: convert to use module_usb_driver()
Now that Joe cleaned up the init/exit functions, we can just get rid of
them entirely and use the proper macro that almost all other USB drivers
now use.
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/storage/usb.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index b4c63fcf7b0b..5c4fe0749af1 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -1071,10 +1071,6 @@ static int storage_probe(struct usb_interface *intf, return result; } -/*********************************************************************** - * Initialization and registration - ***********************************************************************/ - static struct usb_driver usb_storage_driver = { .name = "usb-storage", .probe = storage_probe, @@ -1089,28 +1085,4 @@ static struct usb_driver usb_storage_driver = { .soft_unbind = 1, }; -static int __init usb_stor_init(void) -{ - int retval; - - pr_info("Initializing USB Mass Storage driver...\n"); - - /* register the driver, return usb_register return code if error */ - retval = usb_register(&usb_storage_driver); - if (retval == 0) - pr_info("USB Mass Storage support registered\n"); - return retval; -} - -static void __exit usb_stor_exit(void) -{ - /* Deregister the driver - * This will cause disconnect() to be called for each - * attached unit - */ - pr_info("Deregistering USB Mass Storage driver...\n"); - usb_deregister(&usb_storage_driver); -} - -module_init(usb_stor_init); -module_exit(usb_stor_exit); +module_usb_driver(usb_storage_driver); |