diff options
Diffstat (limited to 'drivers/usb')
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 | ||
| 1375 | static int __init cxacru_init(void) | 1375 | module_usb_driver(cxacru_usb_driver); |
| 1376 | { | ||
| 1377 | return usb_register(&cxacru_usb_driver); | ||
| 1378 | } | ||
| 1379 | |||
| 1380 | static void __exit cxacru_cleanup(void) | ||
| 1381 | { | ||
| 1382 | usb_deregister(&cxacru_usb_driver); | ||
| 1383 | } | ||
| 1384 | |||
| 1385 | module_init(cxacru_init); | ||
| 1386 | module_exit(cxacru_cleanup); | ||
| 1387 | 1376 | ||
| 1388 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1377 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 1389 | MODULE_DESCRIPTION(DRIVER_DESC); | 1378 | MODULE_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 | ||
| 956 | static int __init speedtch_usb_init(void) | 956 | module_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 | |||
| 963 | static void __exit speedtch_usb_cleanup(void) | ||
| 964 | { | ||
| 965 | dbg("%s", __func__); | ||
| 966 | |||
| 967 | usb_deregister(&speedtch_usb_driver); | ||
| 968 | } | ||
| 969 | |||
| 970 | module_init(speedtch_usb_init); | ||
| 971 | module_exit(speedtch_usb_cleanup); | ||
| 972 | 957 | ||
| 973 | MODULE_AUTHOR(DRIVER_AUTHOR); | 958 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 974 | MODULE_DESCRIPTION(DRIVER_DESC); | 959 | MODULE_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 | ||
| 2754 | MODULE_DEVICE_TABLE(usb, uea_ids); | 2754 | MODULE_DEVICE_TABLE(usb, uea_ids); |
| 2755 | 2755 | ||
| 2756 | /** | 2756 | module_usb_driver(uea_driver); |
| 2757 | * uea_init - Initialize the module. | ||
| 2758 | * Register to USB subsystem | ||
| 2759 | */ | ||
| 2760 | static 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 | |||
| 2769 | module_init(uea_init); | ||
| 2770 | |||
| 2771 | /** | ||
| 2772 | * uea_exit - Destroy module | ||
| 2773 | * Deregister with USB subsystem | ||
| 2774 | */ | ||
| 2775 | static 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 | |||
| 2785 | module_exit(uea_exit); | ||
| 2786 | 2757 | ||
| 2787 | MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka"); | 2758 | MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka"); |
| 2788 | MODULE_DESCRIPTION("ADI 930/Eagle USB ADSL Modem driver"); | 2759 | MODULE_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 --- */ | 898 | module_usb_driver(wdm_driver); |
| 899 | |||
| 900 | static int __init wdm_init(void) | ||
| 901 | { | ||
| 902 | int rv; | ||
| 903 | |||
| 904 | rv = usb_register(&wdm_driver); | ||
| 905 | |||
| 906 | return rv; | ||
| 907 | } | ||
| 908 | |||
| 909 | static void __exit wdm_exit(void) | ||
| 910 | { | ||
| 911 | usb_deregister(&wdm_driver); | ||
| 912 | } | ||
| 913 | |||
| 914 | module_init(wdm_init); | ||
| 915 | module_exit(wdm_exit); | ||
| 916 | 899 | ||
| 917 | MODULE_AUTHOR(DRIVER_AUTHOR); | 900 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 918 | MODULE_DESCRIPTION(DRIVER_DESC); | 901 | MODULE_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 | ||
| 1415 | static int __init usblp_init(void) | 1415 | module_usb_driver(usblp_driver); |
| 1416 | { | ||
| 1417 | return usb_register(&usblp_driver); | ||
| 1418 | } | ||
| 1419 | |||
| 1420 | static void __exit usblp_exit(void) | ||
| 1421 | { | ||
| 1422 | usb_deregister(&usblp_driver); | ||
| 1423 | } | ||
| 1424 | |||
| 1425 | module_init(usblp_init); | ||
| 1426 | module_exit(usblp_exit); | ||
| 1427 | 1416 | ||
| 1428 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1417 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 1429 | MODULE_DESCRIPTION(DRIVER_DESC); | 1418 | MODULE_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 | ||
| 1119 | static int __init usbtmc_init(void) | 1119 | module_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 | } | ||
| 1128 | module_init(usbtmc_init); | ||
| 1129 | |||
| 1130 | static void __exit usbtmc_exit(void) | ||
| 1131 | { | ||
| 1132 | usb_deregister(&usbtmc_driver); | ||
| 1133 | } | ||
| 1134 | module_exit(usbtmc_exit); | ||
| 1135 | 1120 | ||
| 1136 | MODULE_LICENSE("GPL"); | 1121 | MODULE_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 | ||
| 54 | struct 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 | ||
| 65 | static const struct dwc3_register dwc3_regs[] = { | 60 | static 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[] = { | |||
| 382 | static int dwc3_regdump_show(struct seq_file *s, void *unused) | 377 | static 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 | ||
| 840 | static int __init hwahc_driver_init(void) | 840 | module_usb_driver(hwahc_driver); |
| 841 | { | ||
| 842 | return usb_register(&hwahc_driver); | ||
| 843 | } | ||
| 844 | module_init(hwahc_driver_init); | ||
| 845 | |||
| 846 | static void __exit hwahc_driver_exit(void) | ||
| 847 | { | ||
| 848 | usb_deregister(&hwahc_driver); | ||
| 849 | } | ||
| 850 | module_exit(hwahc_driver_exit); | ||
| 851 | |||
| 852 | 841 | ||
| 853 | MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); | 842 | MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); |
| 854 | MODULE_DESCRIPTION("Host Wired Adapter USB Host Control Driver"); | 843 | MODULE_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 | 812 | module_usb_driver(mts_usb_driver); | |
| 813 | static int __init microtek_drv_init(void) | ||
| 814 | { | ||
| 815 | return usb_register(&mts_usb_driver); | ||
| 816 | } | ||
| 817 | |||
| 818 | static void __exit microtek_drv_exit(void) | ||
| 819 | { | ||
| 820 | usb_deregister(&mts_usb_driver); | ||
| 821 | } | ||
| 822 | |||
| 823 | module_init(microtek_drv_init); | ||
| 824 | module_exit(microtek_drv_exit); | ||
| 825 | 813 | ||
| 826 | MODULE_AUTHOR( DRIVER_AUTHOR ); | 814 | MODULE_AUTHOR( DRIVER_AUTHOR ); |
| 827 | MODULE_DESCRIPTION( DRIVER_DESC ); | 815 | MODULE_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 | ||
| 888 | static int __init adu_init(void) | 888 | module_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 | |||
| 906 | exit: | ||
| 907 | dbg(2," %s : leave, return value %d", __func__, result); | ||
| 908 | |||
| 909 | return result; | ||
| 910 | } | ||
| 911 | |||
| 912 | static 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 | |||
| 920 | module_init(adu_init); | ||
| 921 | module_exit(adu_exit); | ||
| 922 | 889 | ||
| 923 | MODULE_AUTHOR(DRIVER_AUTHOR); | 890 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 924 | MODULE_DESCRIPTION(DRIVER_DESC); | 891 | MODULE_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 | ||
| 274 | static int __init cypress_init(void) | 274 | module_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 | |||
| 287 | static void __exit cypress_exit(void) | ||
| 288 | { | ||
| 289 | /* deregister this driver with the USB subsystem */ | ||
| 290 | usb_deregister(&cypress_driver); | ||
| 291 | } | ||
| 292 | |||
| 293 | module_init(cypress_init); | ||
| 294 | module_exit(cypress_exit); | ||
| 295 | 275 | ||
| 296 | MODULE_AUTHOR(DRIVER_AUTHOR); | 276 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 297 | MODULE_DESCRIPTION(DRIVER_DESC); | 277 | MODULE_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 | 420 | module_usb_driver(cytherm_driver); | |
| 421 | static 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 | |||
| 437 | static void __exit usb_cytherm_exit(void) | ||
| 438 | { | ||
| 439 | usb_deregister(&cytherm_driver); | ||
| 440 | } | ||
| 441 | |||
| 442 | |||
| 443 | module_init (usb_cytherm_init); | ||
| 444 | module_exit (usb_cytherm_exit); | ||
| 445 | 421 | ||
| 446 | MODULE_AUTHOR(DRIVER_AUTHOR); | 422 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 447 | MODULE_DESCRIPTION(DRIVER_DESC); | 423 | MODULE_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 | ||
| 279 | static int __init emi26_init (void) | 279 | module_usb_driver(emi26_driver); |
| 280 | { | ||
| 281 | return usb_register(&emi26_driver); | ||
| 282 | } | ||
| 283 | |||
| 284 | static void __exit emi26_exit (void) | ||
| 285 | { | ||
| 286 | usb_deregister (&emi26_driver); | ||
| 287 | } | ||
| 288 | |||
| 289 | module_init(emi26_init); | ||
| 290 | module_exit(emi26_exit); | ||
| 291 | 280 | ||
| 292 | MODULE_AUTHOR("Tapio Laxström"); | 281 | MODULE_AUTHOR("Tapio Laxström"); |
| 293 | MODULE_DESCRIPTION("Emagic EMI 2|6 firmware loader."); | 282 | MODULE_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 | ||
| 293 | static int __init emi62_init (void) | 293 | module_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 | |||
| 302 | static void __exit emi62_exit (void) | ||
| 303 | { | ||
| 304 | usb_deregister (&emi62_driver); | ||
| 305 | } | ||
| 306 | |||
| 307 | module_init(emi62_init); | ||
| 308 | module_exit(emi62_exit); | ||
| 309 | 294 | ||
| 310 | MODULE_AUTHOR("Tapio Laxström"); | 295 | MODULE_AUTHOR("Tapio Laxström"); |
| 311 | MODULE_DESCRIPTION("Emagic EMI 6|2m firmware loader."); | 296 | MODULE_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 | ||
| 431 | static int __init usb_idmouse_init(void) | 431 | module_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 | |||
| 446 | static void __exit usb_idmouse_exit(void) | ||
| 447 | { | ||
| 448 | /* deregister this driver with the USB subsystem */ | ||
| 449 | usb_deregister(&idmouse_driver); | ||
| 450 | } | ||
| 451 | |||
| 452 | module_init(usb_idmouse_init); | ||
| 453 | module_exit(usb_idmouse_exit); | ||
| 454 | 432 | ||
| 455 | MODULE_AUTHOR(DRIVER_AUTHOR); | 433 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 456 | MODULE_DESCRIPTION(DRIVER_DESC); | 434 | MODULE_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 | ||
| 930 | static int __init iowarrior_init(void) | 930 | module_usb_driver(iowarrior_driver); |
| 931 | { | ||
| 932 | return usb_register(&iowarrior_driver); | ||
| 933 | } | ||
| 934 | |||
| 935 | static void __exit iowarrior_exit(void) | ||
| 936 | { | ||
| 937 | usb_deregister(&iowarrior_driver); | ||
| 938 | } | ||
| 939 | |||
| 940 | module_init(iowarrior_init); | ||
| 941 | module_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 | ||
| 129 | static int __init isight_firmware_init(void) | 129 | module_usb_driver(isight_firmware_driver); |
| 130 | { | ||
| 131 | return usb_register(&isight_firmware_driver); | ||
| 132 | } | ||
| 133 | |||
| 134 | static void __exit isight_firmware_exit(void) | ||
| 135 | { | ||
| 136 | usb_deregister(&isight_firmware_driver); | ||
| 137 | } | ||
| 138 | |||
| 139 | module_init(isight_firmware_init); | ||
| 140 | module_exit(isight_firmware_exit); | ||
| 141 | 130 | ||
| 142 | MODULE_LICENSE("GPL"); | 131 | MODULE_LICENSE("GPL"); |
| 143 | MODULE_AUTHOR("Matthew Garrett <mjg@redhat.com>"); | 132 | MODULE_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 | /** | 824 | module_usb_driver(ld_usb_driver); |
| 825 | * ld_usb_init | ||
| 826 | */ | ||
| 827 | static 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 | */ | ||
| 842 | static void __exit ld_usb_exit(void) | ||
| 843 | { | ||
| 844 | /* deregister this driver with the USB subsystem */ | ||
| 845 | usb_deregister(&ld_usb_driver); | ||
| 846 | } | ||
| 847 | |||
| 848 | module_init(ld_usb_init); | ||
| 849 | module_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 | 1046 | module_usb_driver(tower_driver); | |
| 1047 | |||
| 1048 | /** | ||
| 1049 | * lego_usb_tower_init | ||
| 1050 | */ | ||
| 1051 | static 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 | |||
| 1069 | exit: | ||
| 1070 | dbg(2, "%s: leave, return value %d", __func__, retval); | ||
| 1071 | |||
| 1072 | return retval; | ||
| 1073 | } | ||
| 1074 | |||
| 1075 | |||
| 1076 | /** | ||
| 1077 | * lego_usb_tower_exit | ||
| 1078 | */ | ||
| 1079 | static 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 | |||
| 1089 | module_init (lego_usb_tower_init); | ||
| 1090 | module_exit (lego_usb_tower_exit); | ||
| 1091 | 1047 | ||
| 1092 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1048 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 1093 | MODULE_DESCRIPTION(DRIVER_DESC); | 1049 | MODULE_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 | ||
| 534 | static int __init usb_rio_init(void) | 534 | module_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 | |||
| 544 | out: | ||
| 545 | return retval; | ||
| 546 | } | ||
| 547 | |||
| 548 | |||
| 549 | static 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 | |||
| 559 | module_init(usb_rio_init); | ||
| 560 | module_exit(usb_rio_cleanup); | ||
| 561 | 535 | ||
| 562 | MODULE_AUTHOR( DRIVER_AUTHOR ); | 536 | MODULE_AUTHOR( DRIVER_AUTHOR ); |
| 563 | MODULE_DESCRIPTION( DRIVER_DESC ); | 537 | MODULE_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 | ||
| 140 | static int __init tv_init(void) | 140 | module_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 | |||
| 153 | static void __exit tv_exit(void) | ||
| 154 | { | ||
| 155 | usb_deregister(&tv_driver); | ||
| 156 | } | ||
| 157 | |||
| 158 | module_init (tv_init); | ||
| 159 | module_exit (tv_exit); | ||
| 160 | 141 | ||
| 161 | MODULE_AUTHOR(DRIVER_AUTHOR); | 142 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 162 | MODULE_DESCRIPTION(DRIVER_DESC); | 143 | MODULE_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 | ||
| 453 | static int __init usb_lcd_init(void) | 453 | module_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 | |||
| 465 | static void __exit usb_lcd_exit(void) | ||
| 466 | { | ||
| 467 | usb_deregister(&lcd_driver); | ||
| 468 | } | ||
| 469 | |||
| 470 | module_init(usb_lcd_init); | ||
| 471 | module_exit(usb_lcd_exit); | ||
| 472 | 454 | ||
| 473 | MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>"); | 455 | MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>"); |
| 474 | MODULE_DESCRIPTION(DRIVER_VERSION); | 456 | MODULE_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 | ||
| 234 | static int __init usb_led_init(void) | 234 | module_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 | |||
| 244 | static void __exit usb_led_exit(void) | ||
| 245 | { | ||
| 246 | usb_deregister(&led_driver); | ||
| 247 | } | ||
| 248 | |||
| 249 | module_init(usb_led_init); | ||
| 250 | module_exit(usb_led_exit); | ||
| 251 | 235 | ||
| 252 | MODULE_AUTHOR(DRIVER_AUTHOR); | 236 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 253 | MODULE_DESCRIPTION(DRIVER_DESC); | 237 | MODULE_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 | ||
| 440 | static int __init usb_sevseg_init(void) | 440 | module_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 | |||
| 450 | static void __exit usb_sevseg_exit(void) | ||
| 451 | { | ||
| 452 | usb_deregister(&sevseg_driver); | ||
| 453 | } | ||
| 454 | |||
| 455 | module_init(usb_sevseg_init); | ||
| 456 | module_exit(usb_sevseg_exit); | ||
| 457 | 441 | ||
| 458 | MODULE_AUTHOR(DRIVER_AUTHOR); | 442 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 459 | MODULE_DESCRIPTION(DRIVER_DESC); | 443 | MODULE_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 | 542 | module_usb_driver(yurex_driver); | |
| 543 | static 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 | |||
| 555 | static void __exit usb_yurex_exit(void) | ||
| 556 | { | ||
| 557 | /* deregister this driver with the USB subsystem */ | ||
| 558 | usb_deregister(&yurex_driver); | ||
| 559 | } | ||
| 560 | |||
| 561 | module_init(usb_yurex_init); | ||
| 562 | module_exit(usb_yurex_exit); | ||
| 563 | 543 | ||
| 564 | MODULE_LICENSE("GPL"); | 544 | MODULE_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 | ||
| 1281 | static int __init alauda_init(void) | 1281 | module_usb_driver(alauda_driver); |
| 1282 | { | ||
| 1283 | return usb_register(&alauda_driver); | ||
| 1284 | } | ||
| 1285 | |||
| 1286 | static void __exit alauda_exit(void) | ||
| 1287 | { | ||
| 1288 | usb_deregister(&alauda_driver); | ||
| 1289 | } | ||
| 1290 | |||
| 1291 | module_init(alauda_init); | ||
| 1292 | module_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 | ||
| 277 | static int __init cypress_init(void) | 277 | module_usb_driver(cypress_driver); |
| 278 | { | ||
| 279 | return usb_register(&cypress_driver); | ||
| 280 | } | ||
| 281 | |||
| 282 | static void __exit cypress_exit(void) | ||
| 283 | { | ||
| 284 | usb_deregister(&cypress_driver); | ||
| 285 | } | ||
| 286 | |||
| 287 | module_init(cypress_init); | ||
| 288 | module_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 | ||
| 756 | static int __init datafab_init(void) | 756 | module_usb_driver(datafab_driver); |
| 757 | { | ||
| 758 | return usb_register(&datafab_driver); | ||
| 759 | } | ||
| 760 | |||
| 761 | static void __exit datafab_exit(void) | ||
| 762 | { | ||
| 763 | usb_deregister(&datafab_driver); | ||
| 764 | } | ||
| 765 | |||
| 766 | module_init(datafab_init); | ||
| 767 | module_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 | ||
| 2412 | static int __init ene_ub6250_init(void) | 2412 | module_usb_driver(ene_ub6250_driver); |
| 2413 | { | ||
| 2414 | return usb_register(&ene_ub6250_driver); | ||
| 2415 | } | ||
| 2416 | |||
| 2417 | static void __exit ene_ub6250_exit(void) | ||
| 2418 | { | ||
| 2419 | usb_deregister(&ene_ub6250_driver); | ||
| 2420 | } | ||
| 2421 | |||
| 2422 | module_init(ene_ub6250_init); | ||
| 2423 | module_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 | ||
| 558 | static int __init freecom_init(void) | 558 | module_usb_driver(freecom_driver); |
| 559 | { | ||
| 560 | return usb_register(&freecom_driver); | ||
| 561 | } | ||
| 562 | |||
| 563 | static void __exit freecom_exit(void) | ||
| 564 | { | ||
| 565 | usb_deregister(&freecom_driver); | ||
| 566 | } | ||
| 567 | |||
| 568 | module_init(freecom_init); | ||
| 569 | module_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 | ||
| 1571 | static int __init isd200_init(void) | 1571 | module_usb_driver(isd200_driver); |
| 1572 | { | ||
| 1573 | return usb_register(&isd200_driver); | ||
| 1574 | } | ||
| 1575 | |||
| 1576 | static void __exit isd200_exit(void) | ||
| 1577 | { | ||
| 1578 | usb_deregister(&isd200_driver); | ||
| 1579 | } | ||
| 1580 | |||
| 1581 | module_init(isd200_init); | ||
| 1582 | module_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 | ||
| 682 | static int __init jumpshot_init(void) | 682 | module_usb_driver(jumpshot_driver); |
| 683 | { | ||
| 684 | return usb_register(&jumpshot_driver); | ||
| 685 | } | ||
| 686 | |||
| 687 | static void __exit jumpshot_exit(void) | ||
| 688 | { | ||
| 689 | usb_deregister(&jumpshot_driver); | ||
| 690 | } | ||
| 691 | |||
| 692 | module_init(jumpshot_init); | ||
| 693 | module_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 | ||
| 235 | static int __init karma_init(void) | 235 | module_usb_driver(karma_driver); |
| 236 | { | ||
| 237 | return usb_register(&karma_driver); | ||
| 238 | } | ||
| 239 | |||
| 240 | static void __exit karma_exit(void) | ||
| 241 | { | ||
| 242 | usb_deregister(&karma_driver); | ||
| 243 | } | ||
| 244 | |||
| 245 | module_init(karma_init); | ||
| 246 | module_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 | ||
| 317 | static int __init onetouch_init(void) | 317 | module_usb_driver(onetouch_driver); |
| 318 | { | ||
| 319 | return usb_register(&onetouch_driver); | ||
| 320 | } | ||
| 321 | |||
| 322 | static void __exit onetouch_exit(void) | ||
| 323 | { | ||
| 324 | usb_deregister(&onetouch_driver); | ||
| 325 | } | ||
| 326 | |||
| 327 | module_init(onetouch_init); | ||
| 328 | module_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 | ||
| 1107 | static int __init realtek_cr_init(void) | 1107 | module_usb_driver(realtek_cr_driver); |
| 1108 | { | ||
| 1109 | return usb_register(&realtek_cr_driver); | ||
| 1110 | } | ||
| 1111 | |||
| 1112 | static void __exit realtek_cr_exit(void) | ||
| 1113 | { | ||
| 1114 | usb_deregister(&realtek_cr_driver); | ||
| 1115 | } | ||
| 1116 | |||
| 1117 | module_init(realtek_cr_init); | ||
| 1118 | module_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 | ||
| 1792 | static int __init sddr09_init(void) | 1792 | module_usb_driver(sddr09_driver); |
| 1793 | { | ||
| 1794 | return usb_register(&sddr09_driver); | ||
| 1795 | } | ||
| 1796 | |||
| 1797 | static void __exit sddr09_exit(void) | ||
| 1798 | { | ||
| 1799 | usb_deregister(&sddr09_driver); | ||
| 1800 | } | ||
| 1801 | |||
| 1802 | module_init(sddr09_init); | ||
| 1803 | module_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 | ||
| 1011 | static int __init sddr55_init(void) | 1011 | module_usb_driver(sddr55_driver); |
| 1012 | { | ||
| 1013 | return usb_register(&sddr55_driver); | ||
| 1014 | } | ||
| 1015 | |||
| 1016 | static void __exit sddr55_exit(void) | ||
| 1017 | { | ||
| 1018 | usb_deregister(&sddr55_driver); | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | module_init(sddr55_init); | ||
| 1022 | module_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 | ||
| 1868 | static int __init usbat_init(void) | 1868 | module_usb_driver(usbat_driver); |
| 1869 | { | ||
| 1870 | return usb_register(&usbat_driver); | ||
| 1871 | } | ||
| 1872 | |||
| 1873 | static void __exit usbat_exit(void) | ||
| 1874 | { | ||
| 1875 | usb_deregister(&usbat_driver); | ||
| 1876 | } | ||
| 1877 | |||
| 1878 | module_init(usbat_init); | ||
| 1879 | module_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 | ||
| 763 | static int uas_init(void) | 763 | module_usb_driver(uas_driver); |
| 764 | { | ||
| 765 | return usb_register(&uas_driver); | ||
| 766 | } | ||
| 767 | |||
| 768 | static void uas_exit(void) | ||
| 769 | { | ||
| 770 | usb_deregister(&uas_driver); | ||
| 771 | } | ||
| 772 | |||
| 773 | module_init(uas_init); | ||
| 774 | module_exit(uas_exit); | ||
| 775 | 764 | ||
| 776 | MODULE_LICENSE("GPL"); | 765 | MODULE_LICENSE("GPL"); |
| 777 | MODULE_AUTHOR("Matthew Wilcox and Sarah Sharp"); | 766 | MODULE_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 | ||
| 691 | static int __init usb_skel_init(void) | 691 | module_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 | |||
| 703 | static void __exit usb_skel_exit(void) | ||
| 704 | { | ||
| 705 | /* deregister this driver with the USB subsystem */ | ||
| 706 | usb_deregister(&skel_driver); | ||
| 707 | } | ||
| 708 | |||
| 709 | module_init(usb_skel_init); | ||
| 710 | module_exit(usb_skel_exit); | ||
| 711 | 692 | ||
| 712 | MODULE_LICENSE("GPL"); | 693 | MODULE_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 | ||
| 658 | static int __init cbaf_driver_init(void) | 658 | module_usb_driver(cbaf_driver); |
| 659 | { | ||
| 660 | return usb_register(&cbaf_driver); | ||
| 661 | } | ||
| 662 | module_init(cbaf_driver_init); | ||
| 663 | |||
| 664 | static void __exit cbaf_driver_exit(void) | ||
| 665 | { | ||
| 666 | usb_deregister(&cbaf_driver); | ||
| 667 | } | ||
| 668 | module_exit(cbaf_driver_exit); | ||
| 669 | 659 | ||
| 670 | MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); | 660 | MODULE_AUTHOR("Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>"); |
| 671 | MODULE_DESCRIPTION("Wireless USB Cable Based Association"); | 661 | MODULE_DESCRIPTION("Wireless USB Cable Based Association"); |
