aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/atm/cxacru.c13
-rw-r--r--drivers/usb/atm/speedtch.c17
-rw-r--r--drivers/usb/atm/ueagle-atm.c31
-rw-r--r--drivers/usb/class/cdc-wdm.c19
-rw-r--r--drivers/usb/class/usblp.c13
-rw-r--r--drivers/usb/class/usbtmc.c17
-rw-r--r--drivers/usb/dwc3/debugfs.c16
-rw-r--r--drivers/usb/host/hwa-hc.c13
-rw-r--r--drivers/usb/image/microtek.c14
-rw-r--r--drivers/usb/misc/adutux.c35
-rw-r--r--drivers/usb/misc/cypress_cy7c63.c22
-rw-r--r--drivers/usb/misc/cytherm.c26
-rw-r--r--drivers/usb/misc/emi26.c13
-rw-r--r--drivers/usb/misc/emi62.c17
-rw-r--r--drivers/usb/misc/idmouse.c24
-rw-r--r--drivers/usb/misc/iowarrior.c13
-rw-r--r--drivers/usb/misc/isight_firmware.c13
-rw-r--r--drivers/usb/misc/ldusb.c27
-rw-r--r--drivers/usb/misc/legousbtower.c46
-rw-r--r--drivers/usb/misc/rio500.c28
-rw-r--r--drivers/usb/misc/trancevibrator.c21
-rw-r--r--drivers/usb/misc/usblcd.c20
-rw-r--r--drivers/usb/misc/usbled.c18
-rw-r--r--drivers/usb/misc/usbsevseg.c18
-rw-r--r--drivers/usb/misc/yurex.c22
-rw-r--r--drivers/usb/storage/alauda.c13
-rw-r--r--drivers/usb/storage/cypress_atacb.c13
-rw-r--r--drivers/usb/storage/datafab.c13
-rw-r--r--drivers/usb/storage/ene_ub6250.c13
-rw-r--r--drivers/usb/storage/freecom.c13
-rw-r--r--drivers/usb/storage/isd200.c13
-rw-r--r--drivers/usb/storage/jumpshot.c13
-rw-r--r--drivers/usb/storage/karma.c13
-rw-r--r--drivers/usb/storage/onetouch.c13
-rw-r--r--drivers/usb/storage/realtek_cr.c13
-rw-r--r--drivers/usb/storage/sddr09.c13
-rw-r--r--drivers/usb/storage/sddr55.c13
-rw-r--r--drivers/usb/storage/shuttle_usbat.c13
-rw-r--r--drivers/usb/storage/uas.c13
-rw-r--r--drivers/usb/usb-skeleton.c21
-rw-r--r--drivers/usb/wusbcore/cbaf.c12
41 files changed, 43 insertions, 688 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index a845f8b8382f..98b89fe19867 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -1372,18 +1372,7 @@ static struct usb_driver cxacru_usb_driver = {
1372 .id_table = cxacru_usb_ids 1372 .id_table = cxacru_usb_ids
1373}; 1373};
1374 1374
1375static int __init cxacru_init(void) 1375module_usb_driver(cxacru_usb_driver);
1376{
1377 return usb_register(&cxacru_usb_driver);
1378}
1379
1380static void __exit cxacru_cleanup(void)
1381{
1382 usb_deregister(&cxacru_usb_driver);
1383}
1384
1385module_init(cxacru_init);
1386module_exit(cxacru_cleanup);
1387 1376
1388MODULE_AUTHOR(DRIVER_AUTHOR); 1377MODULE_AUTHOR(DRIVER_AUTHOR);
1389MODULE_DESCRIPTION(DRIVER_DESC); 1378MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c
index 0842cfbf60cf..b42092e1f164 100644
--- a/drivers/usb/atm/speedtch.c
+++ b/drivers/usb/atm/speedtch.c
@@ -953,22 +953,7 @@ static int speedtch_usb_probe(struct usb_interface *intf, const struct usb_devic
953 return usbatm_usb_probe(intf, id, &speedtch_usbatm_driver); 953 return usbatm_usb_probe(intf, id, &speedtch_usbatm_driver);
954} 954}
955 955
956static int __init speedtch_usb_init(void) 956module_usb_driver(speedtch_usb_driver);
957{
958 dbg("%s: driver version %s", __func__, DRIVER_VERSION);
959
960 return usb_register(&speedtch_usb_driver);
961}
962
963static void __exit speedtch_usb_cleanup(void)
964{
965 dbg("%s", __func__);
966
967 usb_deregister(&speedtch_usb_driver);
968}
969
970module_init(speedtch_usb_init);
971module_exit(speedtch_usb_cleanup);
972 957
973MODULE_AUTHOR(DRIVER_AUTHOR); 958MODULE_AUTHOR(DRIVER_AUTHOR);
974MODULE_DESCRIPTION(DRIVER_DESC); 959MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 428f36801e06..00f171a7a8a0 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2753,36 +2753,7 @@ static struct usb_driver uea_driver = {
2753 2753
2754MODULE_DEVICE_TABLE(usb, uea_ids); 2754MODULE_DEVICE_TABLE(usb, uea_ids);
2755 2755
2756/** 2756module_usb_driver(uea_driver);
2757 * uea_init - Initialize the module.
2758 * Register to USB subsystem
2759 */
2760static int __init uea_init(void)
2761{
2762 printk(KERN_INFO "[ueagle-atm] driver " EAGLEUSBVERSION " loaded\n");
2763
2764 usb_register(&uea_driver);
2765
2766 return 0;
2767}
2768
2769module_init(uea_init);
2770
2771/**
2772 * uea_exit - Destroy module
2773 * Deregister with USB subsystem
2774 */
2775static void __exit uea_exit(void)
2776{
2777 /*
2778 * This calls automatically the uea_disconnect method if necessary:
2779 */
2780 usb_deregister(&uea_driver);
2781
2782 printk(KERN_INFO "[ueagle-atm] driver unloaded\n");
2783}
2784
2785module_exit(uea_exit);
2786 2757
2787MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka"); 2758MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka");
2788MODULE_DESCRIPTION("ADI 930/Eagle USB ADSL Modem driver"); 2759MODULE_DESCRIPTION("ADI 930/Eagle USB ADSL Modem driver");
diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c
index efe684908c1f..1c50baff7725 100644
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -895,24 +895,7 @@ static struct usb_driver wdm_driver = {
895 .supports_autosuspend = 1, 895 .supports_autosuspend = 1,
896}; 896};
897 897
898/* --- low level module stuff --- */ 898module_usb_driver(wdm_driver);
899
900static int __init wdm_init(void)
901{
902 int rv;
903
904 rv = usb_register(&wdm_driver);
905
906 return rv;
907}
908
909static void __exit wdm_exit(void)
910{
911 usb_deregister(&wdm_driver);
912}
913
914module_init(wdm_init);
915module_exit(wdm_exit);
916 899
917MODULE_AUTHOR(DRIVER_AUTHOR); 900MODULE_AUTHOR(DRIVER_AUTHOR);
918MODULE_DESCRIPTION(DRIVER_DESC); 901MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index cb3a93243a05..81ef2e207a8d 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -1412,18 +1412,7 @@ static struct usb_driver usblp_driver = {
1412 .supports_autosuspend = 1, 1412 .supports_autosuspend = 1,
1413}; 1413};
1414 1414
1415static int __init usblp_init(void) 1415module_usb_driver(usblp_driver);
1416{
1417 return usb_register(&usblp_driver);
1418}
1419
1420static void __exit usblp_exit(void)
1421{
1422 usb_deregister(&usblp_driver);
1423}
1424
1425module_init(usblp_init);
1426module_exit(usblp_exit);
1427 1416
1428MODULE_AUTHOR(DRIVER_AUTHOR); 1417MODULE_AUTHOR(DRIVER_AUTHOR);
1429MODULE_DESCRIPTION(DRIVER_DESC); 1418MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 12cf5e7395a8..70d69d06054f 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1116,21 +1116,6 @@ static struct usb_driver usbtmc_driver = {
1116 .resume = usbtmc_resume, 1116 .resume = usbtmc_resume,
1117}; 1117};
1118 1118
1119static int __init usbtmc_init(void) 1119module_usb_driver(usbtmc_driver);
1120{
1121 int retcode;
1122
1123 retcode = usb_register(&usbtmc_driver);
1124 if (retcode)
1125 printk(KERN_ERR KBUILD_MODNAME": Unable to register driver\n");
1126 return retcode;
1127}
1128module_init(usbtmc_init);
1129
1130static void __exit usbtmc_exit(void)
1131{
1132 usb_deregister(&usbtmc_driver);
1133}
1134module_exit(usbtmc_exit);
1135 1120
1136MODULE_LICENSE("GPL"); 1121MODULE_LICENSE("GPL");
diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c
index da1ad77d8d51..fcfa91517ea1 100644
--- a/drivers/usb/dwc3/debugfs.c
+++ b/drivers/usb/dwc3/debugfs.c
@@ -51,18 +51,13 @@
51#include "gadget.h" 51#include "gadget.h"
52#include "io.h" 52#include "io.h"
53 53
54struct dwc3_register {
55 const char *name;
56 u32 offset;
57};
58
59#define dump_register(nm) \ 54#define dump_register(nm) \
60{ \ 55{ \
61 .name = __stringify(nm), \ 56 .name = __stringify(nm), \
62 .offset = DWC3_ ##nm, \ 57 .offset = DWC3_ ##nm, \
63} 58}
64 59
65static const struct dwc3_register dwc3_regs[] = { 60static const struct debugfs_reg32 dwc3_regs[] = {
66 dump_register(GSBUSCFG0), 61 dump_register(GSBUSCFG0),
67 dump_register(GSBUSCFG1), 62 dump_register(GSBUSCFG1),
68 dump_register(GTXTHRCFG), 63 dump_register(GTXTHRCFG),
@@ -382,15 +377,10 @@ static const struct dwc3_register dwc3_regs[] = {
382static int dwc3_regdump_show(struct seq_file *s, void *unused) 377static int dwc3_regdump_show(struct seq_file *s, void *unused)
383{ 378{
384 struct dwc3 *dwc = s->private; 379 struct dwc3 *dwc = s->private;
385 int i;
386 380
387 seq_printf(s, "DesignWare USB3 Core Register Dump\n"); 381 seq_printf(s, "DesignWare USB3 Core Register Dump\n");
388 382 debugfs_print_regs32(s, dwc3_regs, ARRAY_SIZE(dwc3_regs),
389 for (i = 0; i < ARRAY_SIZE(dwc3_regs); i++) { 383 dwc->regs, "");
390 seq_printf(s, "%-20s : %08x\n", dwc3_regs[i].name,
391 dwc3_readl(dwc->regs, dwc3_regs[i].offset));
392 }
393
394 return 0; 384 return 0;
395} 385}
396 386
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c
index 9bfac657572e..056fb2d37c88 100644
--- a/drivers/usb/host/hwa-hc.c
+++ b/drivers/usb/host/hwa-hc.c
@@ -837,18 +837,7 @@ static struct usb_driver hwahc_driver = {
837 .id_table = hwahc_id_table, 837 .id_table = hwahc_id_table,
838}; 838};
839 839
840static int __init hwahc_driver_init(void) 840module_usb_driver(hwahc_driver);
841{
842 return usb_register(&hwahc_driver);
843}
844module_init(hwahc_driver_init);
845
846static void __exit hwahc_driver_exit(void)
847{
848 usb_deregister(&hwahc_driver);
849}
850module_exit(hwahc_driver_exit);
851
852 841
853MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); 842MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>");
854MODULE_DESCRIPTION("Host Wired Adapter USB Host Control Driver"); 843MODULE_DESCRIPTION("Host Wired Adapter USB Host Control Driver");
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
index 27e209a7222f..9c0f8caba3be 100644
--- a/drivers/usb/image/microtek.c
+++ b/drivers/usb/image/microtek.c
@@ -809,19 +809,7 @@ static void mts_usb_disconnect (struct usb_interface *intf)
809 kfree(desc); 809 kfree(desc);
810} 810}
811 811
812 812module_usb_driver(mts_usb_driver);
813static int __init microtek_drv_init(void)
814{
815 return usb_register(&mts_usb_driver);
816}
817
818static void __exit microtek_drv_exit(void)
819{
820 usb_deregister(&mts_usb_driver);
821}
822
823module_init(microtek_drv_init);
824module_exit(microtek_drv_exit);
825 813
826MODULE_AUTHOR( DRIVER_AUTHOR ); 814MODULE_AUTHOR( DRIVER_AUTHOR );
827MODULE_DESCRIPTION( DRIVER_DESC ); 815MODULE_DESCRIPTION( DRIVER_DESC );
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index fe858711651c..284b85461410 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -885,40 +885,7 @@ static struct usb_driver adu_driver = {
885 .id_table = device_table, 885 .id_table = device_table,
886}; 886};
887 887
888static int __init adu_init(void) 888module_usb_driver(adu_driver);
889{
890 int result;
891
892 dbg(2," %s : enter", __func__);
893
894 /* register this driver with the USB subsystem */
895 result = usb_register(&adu_driver);
896 if (result < 0) {
897 printk(KERN_ERR "usb_register failed for the "__FILE__
898 " driver. Error number %d\n", result);
899 goto exit;
900 }
901
902 printk(KERN_INFO "adutux " DRIVER_DESC " " DRIVER_VERSION "\n");
903 printk(KERN_INFO "adutux is an experimental driver. "
904 "Use at your own risk\n");
905
906exit:
907 dbg(2," %s : leave, return value %d", __func__, result);
908
909 return result;
910}
911
912static void __exit adu_exit(void)
913{
914 dbg(2," %s : enter", __func__);
915 /* deregister this driver with the USB subsystem */
916 usb_deregister(&adu_driver);
917 dbg(2," %s : leave", __func__);
918}
919
920module_init(adu_init);
921module_exit(adu_exit);
922 889
923MODULE_AUTHOR(DRIVER_AUTHOR); 890MODULE_AUTHOR(DRIVER_AUTHOR);
924MODULE_DESCRIPTION(DRIVER_DESC); 891MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/cypress_cy7c63.c b/drivers/usb/misc/cypress_cy7c63.c
index 9251773ecef4..3f7c1a92579f 100644
--- a/drivers/usb/misc/cypress_cy7c63.c
+++ b/drivers/usb/misc/cypress_cy7c63.c
@@ -271,27 +271,7 @@ static struct usb_driver cypress_driver = {
271 .id_table = cypress_table, 271 .id_table = cypress_table,
272}; 272};
273 273
274static int __init cypress_init(void) 274module_usb_driver(cypress_driver);
275{
276 int result;
277
278 /* register this driver with the USB subsystem */
279 result = usb_register(&cypress_driver);
280 if (result)
281 printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! "
282 "Error number: %d\n", result);
283
284 return result;
285}
286
287static void __exit cypress_exit(void)
288{
289 /* deregister this driver with the USB subsystem */
290 usb_deregister(&cypress_driver);
291}
292
293module_init(cypress_init);
294module_exit(cypress_exit);
295 275
296MODULE_AUTHOR(DRIVER_AUTHOR); 276MODULE_AUTHOR(DRIVER_AUTHOR);
297MODULE_DESCRIPTION(DRIVER_DESC); 277MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
index 1d7251bc1b5f..5b9831b95d97 100644
--- a/drivers/usb/misc/cytherm.c
+++ b/drivers/usb/misc/cytherm.c
@@ -417,31 +417,7 @@ static void cytherm_disconnect(struct usb_interface *interface)
417 dev_info(&interface->dev, "Cypress thermometer now disconnected\n"); 417 dev_info(&interface->dev, "Cypress thermometer now disconnected\n");
418} 418}
419 419
420 420module_usb_driver(cytherm_driver);
421static int __init usb_cytherm_init(void)
422{
423 int result;
424
425 result = usb_register(&cytherm_driver);
426 if (result) {
427 printk(KERN_ERR KBUILD_MODNAME ": usb_register failed! "
428 "Error number: %d\n", result);
429 return result;
430 }
431
432 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
433 DRIVER_DESC "\n");
434 return 0;
435}
436
437static void __exit usb_cytherm_exit(void)
438{
439 usb_deregister(&cytherm_driver);
440}
441
442
443module_init (usb_cytherm_init);
444module_exit (usb_cytherm_exit);
445 421
446MODULE_AUTHOR(DRIVER_AUTHOR); 422MODULE_AUTHOR(DRIVER_AUTHOR);
447MODULE_DESCRIPTION(DRIVER_DESC); 423MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c
index a6521c95f683..d9b6a0355443 100644
--- a/drivers/usb/misc/emi26.c
+++ b/drivers/usb/misc/emi26.c
@@ -276,18 +276,7 @@ static struct usb_driver emi26_driver = {
276 .id_table = id_table, 276 .id_table = id_table,
277}; 277};
278 278
279static int __init emi26_init (void) 279module_usb_driver(emi26_driver);
280{
281 return usb_register(&emi26_driver);
282}
283
284static void __exit emi26_exit (void)
285{
286 usb_deregister (&emi26_driver);
287}
288
289module_init(emi26_init);
290module_exit(emi26_exit);
291 280
292MODULE_AUTHOR("Tapio Laxström"); 281MODULE_AUTHOR("Tapio Laxström");
293MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader."); 282MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader.");
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c
index fc15ad4c3139..9f39062ebb08 100644
--- a/drivers/usb/misc/emi62.c
+++ b/drivers/usb/misc/emi62.c
@@ -290,22 +290,7 @@ static struct usb_driver emi62_driver = {
290 .id_table = id_table, 290 .id_table = id_table,
291}; 291};
292 292
293static int __init emi62_init (void) 293module_usb_driver(emi62_driver);
294{
295 int retval;
296 retval = usb_register (&emi62_driver);
297 if (retval)
298 printk(KERN_ERR "adi-emi: registration failed\n");
299 return retval;
300}
301
302static void __exit emi62_exit (void)
303{
304 usb_deregister (&emi62_driver);
305}
306
307module_init(emi62_init);
308module_exit(emi62_exit);
309 294
310MODULE_AUTHOR("Tapio Laxström"); 295MODULE_AUTHOR("Tapio Laxström");
311MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader."); 296MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader.");
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index 515b67fffab1..0dee24698504 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -428,29 +428,7 @@ static void idmouse_disconnect(struct usb_interface *interface)
428 dev_info(&interface->dev, "disconnected\n"); 428 dev_info(&interface->dev, "disconnected\n");
429} 429}
430 430
431static int __init usb_idmouse_init(void) 431module_usb_driver(idmouse_driver);
432{
433 int result;
434
435 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
436 DRIVER_DESC "\n");
437
438 /* register this driver with the USB subsystem */
439 result = usb_register(&idmouse_driver);
440 if (result)
441 err("Unable to register device (error %d).", result);
442
443 return result;
444}
445
446static void __exit usb_idmouse_exit(void)
447{
448 /* deregister this driver with the USB subsystem */
449 usb_deregister(&idmouse_driver);
450}
451
452module_init(usb_idmouse_init);
453module_exit(usb_idmouse_exit);
454 432
455MODULE_AUTHOR(DRIVER_AUTHOR); 433MODULE_AUTHOR(DRIVER_AUTHOR);
456MODULE_DESCRIPTION(DRIVER_DESC); 434MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 81457904d6ba..7676b5b7e171 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -927,15 +927,4 @@ static struct usb_driver iowarrior_driver = {
927 .id_table = iowarrior_ids, 927 .id_table = iowarrior_ids,
928}; 928};
929 929
930static int __init iowarrior_init(void) 930module_usb_driver(iowarrior_driver);
931{
932 return usb_register(&iowarrior_driver);
933}
934
935static void __exit iowarrior_exit(void)
936{
937 usb_deregister(&iowarrior_driver);
938}
939
940module_init(iowarrior_init);
941module_exit(iowarrior_exit);
diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c
index fe1d44319d0a..1dc7e9581cc6 100644
--- a/drivers/usb/misc/isight_firmware.c
+++ b/drivers/usb/misc/isight_firmware.c
@@ -126,18 +126,7 @@ static struct usb_driver isight_firmware_driver = {
126 .id_table = id_table, 126 .id_table = id_table,
127}; 127};
128 128
129static int __init isight_firmware_init(void) 129module_usb_driver(isight_firmware_driver);
130{
131 return usb_register(&isight_firmware_driver);
132}
133
134static void __exit isight_firmware_exit(void)
135{
136 usb_deregister(&isight_firmware_driver);
137}
138
139module_init(isight_firmware_init);
140module_exit(isight_firmware_exit);
141 130
142MODULE_LICENSE("GPL"); 131MODULE_LICENSE("GPL");
143MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>"); 132MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>");
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index 48c166f0d764..5db4ab52061e 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -821,30 +821,5 @@ static struct usb_driver ld_usb_driver = {
821 .id_table = ld_usb_table, 821 .id_table = ld_usb_table,
822}; 822};
823 823
824/** 824module_usb_driver(ld_usb_driver);
825 * ld_usb_init
826 */
827static int __init ld_usb_init(void)
828{
829 int retval;
830
831 /* register this driver with the USB subsystem */
832 retval = usb_register(&ld_usb_driver);
833 if (retval)
834 err("usb_register failed for the %s driver. Error number %d\n", __FILE__, retval);
835
836 return retval;
837}
838
839/**
840 * ld_usb_exit
841 */
842static void __exit ld_usb_exit(void)
843{
844 /* deregister this driver with the USB subsystem */
845 usb_deregister(&ld_usb_driver);
846}
847
848module_init(ld_usb_init);
849module_exit(ld_usb_exit);
850 825
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index a989356f693e..16937da31cd8 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -1043,51 +1043,7 @@ static void tower_disconnect (struct usb_interface *interface)
1043 dbg(2, "%s: leave", __func__); 1043 dbg(2, "%s: leave", __func__);
1044} 1044}
1045 1045
1046 1046module_usb_driver(tower_driver);
1047
1048/**
1049 * lego_usb_tower_init
1050 */
1051static int __init lego_usb_tower_init(void)
1052{
1053 int result;
1054 int retval = 0;
1055
1056 dbg(2, "%s: enter", __func__);
1057
1058 /* register this driver with the USB subsystem */
1059 result = usb_register(&tower_driver);
1060 if (result < 0) {
1061 err("usb_register failed for the %s driver. Error number %d", __FILE__, result);
1062 retval = -1;
1063 goto exit;
1064 }
1065
1066 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
1067 DRIVER_DESC "\n");
1068
1069exit:
1070 dbg(2, "%s: leave, return value %d", __func__, retval);
1071
1072 return retval;
1073}
1074
1075
1076/**
1077 * lego_usb_tower_exit
1078 */
1079static void __exit lego_usb_tower_exit(void)
1080{
1081 dbg(2, "%s: enter", __func__);
1082
1083 /* deregister this driver with the USB subsystem */
1084 usb_deregister (&tower_driver);
1085
1086 dbg(2, "%s: leave", __func__);
1087}
1088
1089module_init (lego_usb_tower_init);
1090module_exit (lego_usb_tower_exit);
1091 1047
1092MODULE_AUTHOR(DRIVER_AUTHOR); 1048MODULE_AUTHOR(DRIVER_AUTHOR);
1093MODULE_DESCRIPTION(DRIVER_DESC); 1049MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c
index 4e23d3841b43..487a8ce0775e 100644
--- a/drivers/usb/misc/rio500.c
+++ b/drivers/usb/misc/rio500.c
@@ -531,33 +531,7 @@ static struct usb_driver rio_driver = {
531 .id_table = rio_table, 531 .id_table = rio_table,
532}; 532};
533 533
534static int __init usb_rio_init(void) 534module_usb_driver(rio_driver);
535{
536 int retval;
537 retval = usb_register(&rio_driver);
538 if (retval)
539 goto out;
540
541 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
542 DRIVER_DESC "\n");
543
544out:
545 return retval;
546}
547
548
549static void __exit usb_rio_cleanup(void)
550{
551 struct rio_usb_data *rio = &rio_instance;
552
553 rio->present = 0;
554 usb_deregister(&rio_driver);
555
556
557}
558
559module_init(usb_rio_init);
560module_exit(usb_rio_cleanup);
561 535
562MODULE_AUTHOR( DRIVER_AUTHOR ); 536MODULE_AUTHOR( DRIVER_AUTHOR );
563MODULE_DESCRIPTION( DRIVER_DESC ); 537MODULE_DESCRIPTION( DRIVER_DESC );
diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c
index f63776a48e2a..741efed4a236 100644
--- a/drivers/usb/misc/trancevibrator.c
+++ b/drivers/usb/misc/trancevibrator.c
@@ -137,26 +137,7 @@ static struct usb_driver tv_driver = {
137 .id_table = id_table, 137 .id_table = id_table,
138}; 138};
139 139
140static int __init tv_init(void) 140module_usb_driver(tv_driver);
141{
142 int retval = usb_register(&tv_driver);
143 if (retval) {
144 err("usb_register failed. Error number %d", retval);
145 return retval;
146 }
147
148 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
149 DRIVER_DESC "\n");
150 return 0;
151}
152
153static void __exit tv_exit(void)
154{
155 usb_deregister(&tv_driver);
156}
157
158module_init (tv_init);
159module_exit (tv_exit);
160 141
161MODULE_AUTHOR(DRIVER_AUTHOR); 142MODULE_AUTHOR(DRIVER_AUTHOR);
162MODULE_DESCRIPTION(DRIVER_DESC); 143MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 1871cdf10da3..e2b4bd31c2b6 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -450,25 +450,7 @@ static struct usb_driver lcd_driver = {
450 .supports_autosuspend = 1, 450 .supports_autosuspend = 1,
451}; 451};
452 452
453static int __init usb_lcd_init(void) 453module_usb_driver(lcd_driver);
454{
455 int result;
456
457 result = usb_register(&lcd_driver);
458 if (result)
459 err("usb_register failed. Error number %d", result);
460
461 return result;
462}
463
464
465static void __exit usb_lcd_exit(void)
466{
467 usb_deregister(&lcd_driver);
468}
469
470module_init(usb_lcd_init);
471module_exit(usb_lcd_exit);
472 454
473MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>"); 455MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>");
474MODULE_DESCRIPTION(DRIVER_VERSION); 456MODULE_DESCRIPTION(DRIVER_VERSION);
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index 43f84e50d514..4af56fbc3c06 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -231,23 +231,7 @@ static struct usb_driver led_driver = {
231 .id_table = id_table, 231 .id_table = id_table,
232}; 232};
233 233
234static int __init usb_led_init(void) 234module_usb_driver(led_driver);
235{
236 int retval = 0;
237
238 retval = usb_register(&led_driver);
239 if (retval)
240 err("usb_register failed. Error number %d", retval);
241 return retval;
242}
243
244static void __exit usb_led_exit(void)
245{
246 usb_deregister(&led_driver);
247}
248
249module_init(usb_led_init);
250module_exit(usb_led_exit);
251 235
252MODULE_AUTHOR(DRIVER_AUTHOR); 236MODULE_AUTHOR(DRIVER_AUTHOR);
253MODULE_DESCRIPTION(DRIVER_DESC); 237MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c
index 417b8f207e8b..107bf13b1cf1 100644
--- a/drivers/usb/misc/usbsevseg.c
+++ b/drivers/usb/misc/usbsevseg.c
@@ -437,23 +437,7 @@ static struct usb_driver sevseg_driver = {
437 .supports_autosuspend = 1, 437 .supports_autosuspend = 1,
438}; 438};
439 439
440static int __init usb_sevseg_init(void) 440module_usb_driver(sevseg_driver);
441{
442 int rc = 0;
443
444 rc = usb_register(&sevseg_driver);
445 if (rc)
446 err("usb_register failed. Error number %d", rc);
447 return rc;
448}
449
450static void __exit usb_sevseg_exit(void)
451{
452 usb_deregister(&sevseg_driver);
453}
454
455module_init(usb_sevseg_init);
456module_exit(usb_sevseg_exit);
457 441
458MODULE_AUTHOR(DRIVER_AUTHOR); 442MODULE_AUTHOR(DRIVER_AUTHOR);
459MODULE_DESCRIPTION(DRIVER_DESC); 443MODULE_DESCRIPTION(DRIVER_DESC);
diff --git a/drivers/usb/misc/yurex.c b/drivers/usb/misc/yurex.c
index ac5bfd619e62..897edda42270 100644
--- a/drivers/usb/misc/yurex.c
+++ b/drivers/usb/misc/yurex.c
@@ -539,26 +539,6 @@ static const struct file_operations yurex_fops = {
539 .llseek = default_llseek, 539 .llseek = default_llseek,
540}; 540};
541 541
542 542module_usb_driver(yurex_driver);
543static int __init usb_yurex_init(void)
544{
545 int result;
546
547 /* register this driver with the USB subsystem */
548 result = usb_register(&yurex_driver);
549 if (result)
550 err("usb_register failed. Error number %d", result);
551
552 return result;
553}
554
555static void __exit usb_yurex_exit(void)
556{
557 /* deregister this driver with the USB subsystem */
558 usb_deregister(&yurex_driver);
559}
560
561module_init(usb_yurex_init);
562module_exit(usb_yurex_exit);
563 543
564MODULE_LICENSE("GPL"); 544MODULE_LICENSE("GPL");
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
index 42d0eaed4a01..3ca87a823342 100644
--- a/drivers/usb/storage/alauda.c
+++ b/drivers/usb/storage/alauda.c
@@ -1278,15 +1278,4 @@ static struct usb_driver alauda_driver = {
1278 .soft_unbind = 1, 1278 .soft_unbind = 1,
1279}; 1279};
1280 1280
1281static int __init alauda_init(void) 1281module_usb_driver(alauda_driver);
1282{
1283 return usb_register(&alauda_driver);
1284}
1285
1286static void __exit alauda_exit(void)
1287{
1288 usb_deregister(&alauda_driver);
1289}
1290
1291module_init(alauda_init);
1292module_exit(alauda_exit);
diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c
index c84471821183..c7909dfa2434 100644
--- a/drivers/usb/storage/cypress_atacb.c
+++ b/drivers/usb/storage/cypress_atacb.c
@@ -274,15 +274,4 @@ static struct usb_driver cypress_driver = {
274 .soft_unbind = 1, 274 .soft_unbind = 1,
275}; 275};
276 276
277static int __init cypress_init(void) 277module_usb_driver(cypress_driver);
278{
279 return usb_register(&cypress_driver);
280}
281
282static void __exit cypress_exit(void)
283{
284 usb_deregister(&cypress_driver);
285}
286
287module_init(cypress_init);
288module_exit(cypress_exit);
diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c
index ded836b02d7b..a99be857b794 100644
--- a/drivers/usb/storage/datafab.c
+++ b/drivers/usb/storage/datafab.c
@@ -753,15 +753,4 @@ static struct usb_driver datafab_driver = {
753 .soft_unbind = 1, 753 .soft_unbind = 1,
754}; 754};
755 755
756static int __init datafab_init(void) 756module_usb_driver(datafab_driver);
757{
758 return usb_register(&datafab_driver);
759}
760
761static void __exit datafab_exit(void)
762{
763 usb_deregister(&datafab_driver);
764}
765
766module_init(datafab_init);
767module_exit(datafab_exit);
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c
index 9fbe742343c6..b0a1687ca942 100644
--- a/drivers/usb/storage/ene_ub6250.c
+++ b/drivers/usb/storage/ene_ub6250.c
@@ -2409,15 +2409,4 @@ static struct usb_driver ene_ub6250_driver = {
2409 .soft_unbind = 1, 2409 .soft_unbind = 1,
2410}; 2410};
2411 2411
2412static int __init ene_ub6250_init(void) 2412module_usb_driver(ene_ub6250_driver);
2413{
2414 return usb_register(&ene_ub6250_driver);
2415}
2416
2417static void __exit ene_ub6250_exit(void)
2418{
2419 usb_deregister(&ene_ub6250_driver);
2420}
2421
2422module_init(ene_ub6250_init);
2423module_exit(ene_ub6250_exit);
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
index 6542ca40d505..03d4a873748c 100644
--- a/drivers/usb/storage/freecom.c
+++ b/drivers/usb/storage/freecom.c
@@ -555,15 +555,4 @@ static struct usb_driver freecom_driver = {
555 .soft_unbind = 1, 555 .soft_unbind = 1,
556}; 556};
557 557
558static int __init freecom_init(void) 558module_usb_driver(freecom_driver);
559{
560 return usb_register(&freecom_driver);
561}
562
563static void __exit freecom_exit(void)
564{
565 usb_deregister(&freecom_driver);
566}
567
568module_init(freecom_init);
569module_exit(freecom_exit);
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c
index ffc4193e9505..6d6923317f10 100644
--- a/drivers/usb/storage/isd200.c
+++ b/drivers/usb/storage/isd200.c
@@ -1568,15 +1568,4 @@ static struct usb_driver isd200_driver = {
1568 .soft_unbind = 1, 1568 .soft_unbind = 1,
1569}; 1569};
1570 1570
1571static int __init isd200_init(void) 1571module_usb_driver(isd200_driver);
1572{
1573 return usb_register(&isd200_driver);
1574}
1575
1576static void __exit isd200_exit(void)
1577{
1578 usb_deregister(&isd200_driver);
1579}
1580
1581module_init(isd200_init);
1582module_exit(isd200_exit);
diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c
index 6168596c5ac6..54b71650b69c 100644
--- a/drivers/usb/storage/jumpshot.c
+++ b/drivers/usb/storage/jumpshot.c
@@ -679,15 +679,4 @@ static struct usb_driver jumpshot_driver = {
679 .soft_unbind = 1, 679 .soft_unbind = 1,
680}; 680};
681 681
682static int __init jumpshot_init(void) 682module_usb_driver(jumpshot_driver);
683{
684 return usb_register(&jumpshot_driver);
685}
686
687static void __exit jumpshot_exit(void)
688{
689 usb_deregister(&jumpshot_driver);
690}
691
692module_init(jumpshot_init);
693module_exit(jumpshot_exit);
diff --git a/drivers/usb/storage/karma.c b/drivers/usb/storage/karma.c
index ba1b78906880..35181e29124d 100644
--- a/drivers/usb/storage/karma.c
+++ b/drivers/usb/storage/karma.c
@@ -232,15 +232,4 @@ static struct usb_driver karma_driver = {
232 .soft_unbind = 1, 232 .soft_unbind = 1,
233}; 233};
234 234
235static int __init karma_init(void) 235module_usb_driver(karma_driver);
236{
237 return usb_register(&karma_driver);
238}
239
240static void __exit karma_exit(void)
241{
242 usb_deregister(&karma_driver);
243}
244
245module_init(karma_init);
246module_exit(karma_exit);
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 1943be5a2914..721c8c587305 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -314,15 +314,4 @@ static struct usb_driver onetouch_driver = {
314 .soft_unbind = 1, 314 .soft_unbind = 1,
315}; 315};
316 316
317static int __init onetouch_init(void) 317module_usb_driver(onetouch_driver);
318{
319 return usb_register(&onetouch_driver);
320}
321
322static void __exit onetouch_exit(void)
323{
324 usb_deregister(&onetouch_driver);
325}
326
327module_init(onetouch_init);
328module_exit(onetouch_exit);
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c
index 0ce5f79197e7..c41cd30d2c01 100644
--- a/drivers/usb/storage/realtek_cr.c
+++ b/drivers/usb/storage/realtek_cr.c
@@ -1104,15 +1104,4 @@ static struct usb_driver realtek_cr_driver = {
1104 .supports_autosuspend = 1, 1104 .supports_autosuspend = 1,
1105}; 1105};
1106 1106
1107static int __init realtek_cr_init(void) 1107module_usb_driver(realtek_cr_driver);
1108{
1109 return usb_register(&realtek_cr_driver);
1110}
1111
1112static void __exit realtek_cr_exit(void)
1113{
1114 usb_deregister(&realtek_cr_driver);
1115}
1116
1117module_init(realtek_cr_init);
1118module_exit(realtek_cr_exit);
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index bcb9a709d349..83ee49e737bd 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -1789,15 +1789,4 @@ static struct usb_driver sddr09_driver = {
1789 .soft_unbind = 1, 1789 .soft_unbind = 1,
1790}; 1790};
1791 1791
1792static int __init sddr09_init(void) 1792module_usb_driver(sddr09_driver);
1793{
1794 return usb_register(&sddr09_driver);
1795}
1796
1797static void __exit sddr09_exit(void)
1798{
1799 usb_deregister(&sddr09_driver);
1800}
1801
1802module_init(sddr09_init);
1803module_exit(sddr09_exit);
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c
index 44dfed7754ed..8983ec2ffb5a 100644
--- a/drivers/usb/storage/sddr55.c
+++ b/drivers/usb/storage/sddr55.c
@@ -1008,15 +1008,4 @@ static struct usb_driver sddr55_driver = {
1008 .soft_unbind = 1, 1008 .soft_unbind = 1,
1009}; 1009};
1010 1010
1011static int __init sddr55_init(void) 1011module_usb_driver(sddr55_driver);
1012{
1013 return usb_register(&sddr55_driver);
1014}
1015
1016static void __exit sddr55_exit(void)
1017{
1018 usb_deregister(&sddr55_driver);
1019}
1020
1021module_init(sddr55_init);
1022module_exit(sddr55_exit);
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
index 0b00091d2ae9..a4c02751af4e 100644
--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -1865,15 +1865,4 @@ static struct usb_driver usbat_driver = {
1865 .soft_unbind = 1, 1865 .soft_unbind = 1,
1866}; 1866};
1867 1867
1868static int __init usbat_init(void) 1868module_usb_driver(usbat_driver);
1869{
1870 return usb_register(&usbat_driver);
1871}
1872
1873static void __exit usbat_exit(void)
1874{
1875 usb_deregister(&usbat_driver);
1876}
1877
1878module_init(usbat_init);
1879module_exit(usbat_exit);
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 1d10d5b8204c..a33ead5dce20 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -760,18 +760,7 @@ static struct usb_driver uas_driver = {
760 .id_table = uas_usb_ids, 760 .id_table = uas_usb_ids,
761}; 761};
762 762
763static int uas_init(void) 763module_usb_driver(uas_driver);
764{
765 return usb_register(&uas_driver);
766}
767
768static void uas_exit(void)
769{
770 usb_deregister(&uas_driver);
771}
772
773module_init(uas_init);
774module_exit(uas_exit);
775 764
776MODULE_LICENSE("GPL"); 765MODULE_LICENSE("GPL");
777MODULE_AUTHOR("Matthew Wilcox and Sarah Sharp"); 766MODULE_AUTHOR("Matthew Wilcox and Sarah Sharp");
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 32d6fc953904..5c6c1bdbd455 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -688,25 +688,6 @@ static struct usb_driver skel_driver = {
688 .supports_autosuspend = 1, 688 .supports_autosuspend = 1,
689}; 689};
690 690
691static int __init usb_skel_init(void) 691module_usb_driver(skel_driver);
692{
693 int result;
694
695 /* register this driver with the USB subsystem */
696 result = usb_register(&skel_driver);
697 if (result)
698 err("usb_register failed. Error number %d", result);
699
700 return result;
701}
702
703static void __exit usb_skel_exit(void)
704{
705 /* deregister this driver with the USB subsystem */
706 usb_deregister(&skel_driver);
707}
708
709module_init(usb_skel_init);
710module_exit(usb_skel_exit);
711 692
712MODULE_LICENSE("GPL"); 693MODULE_LICENSE("GPL");
diff --git a/drivers/usb/wusbcore/cbaf.c b/drivers/usb/wusbcore/cbaf.c
index 200fd7c6c7d5..7f78f300f8fb 100644
--- a/drivers/usb/wusbcore/cbaf.c
+++ b/drivers/usb/wusbcore/cbaf.c
@@ -655,17 +655,7 @@ static struct usb_driver cbaf_driver = {
655 .disconnect = cbaf_disconnect, 655 .disconnect = cbaf_disconnect,
656}; 656};
657 657
658static int __init cbaf_driver_init(void) 658module_usb_driver(cbaf_driver);
659{
660 return usb_register(&cbaf_driver);
661}
662module_init(cbaf_driver_init);
663
664static void __exit cbaf_driver_exit(void)
665{
666 usb_deregister(&cbaf_driver);
667}
668module_exit(cbaf_driver_exit);
669 659
670MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); 660MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>");
671MODULE_DESCRIPTION("Wireless USB Cable Based Association"); 661MODULE_DESCRIPTION("Wireless USB Cable Based Association");