diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 14:50:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-19 14:50:10 -0400 |
commit | 4601de807d7755aabd35faf5e15ae233241b8582 (patch) | |
tree | b7cc0cd47b16fbc89d3d222577e8ee403030cfbe | |
parent | 191648d03d20229523d9a75b8abef56421298d28 (diff) |
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>
-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, | |||
1071 | return result; | 1071 | return result; |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | /*********************************************************************** | ||
1075 | * Initialization and registration | ||
1076 | ***********************************************************************/ | ||
1077 | |||
1078 | static struct usb_driver usb_storage_driver = { | 1074 | static struct usb_driver usb_storage_driver = { |
1079 | .name = "usb-storage", | 1075 | .name = "usb-storage", |
1080 | .probe = storage_probe, | 1076 | .probe = storage_probe, |
@@ -1089,28 +1085,4 @@ static struct usb_driver usb_storage_driver = { | |||
1089 | .soft_unbind = 1, | 1085 | .soft_unbind = 1, |
1090 | }; | 1086 | }; |
1091 | 1087 | ||
1092 | static int __init usb_stor_init(void) | 1088 | module_usb_driver(usb_storage_driver); |
1093 | { | ||
1094 | int retval; | ||
1095 | |||
1096 | pr_info("Initializing USB Mass Storage driver...\n"); | ||
1097 | |||
1098 | /* register the driver, return usb_register return code if error */ | ||
1099 | retval = usb_register(&usb_storage_driver); | ||
1100 | if (retval == 0) | ||
1101 | pr_info("USB Mass Storage support registered\n"); | ||
1102 | return retval; | ||
1103 | } | ||
1104 | |||
1105 | static void __exit usb_stor_exit(void) | ||
1106 | { | ||
1107 | /* Deregister the driver | ||
1108 | * This will cause disconnect() to be called for each | ||
1109 | * attached unit | ||
1110 | */ | ||
1111 | pr_info("Deregistering USB Mass Storage driver...\n"); | ||
1112 | usb_deregister(&usb_storage_driver); | ||
1113 | } | ||
1114 | |||
1115 | module_init(usb_stor_init); | ||
1116 | module_exit(usb_stor_exit); | ||