diff options
Diffstat (limited to 'drivers/net')
44 files changed, 50 insertions, 668 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index a72c7bfb4090..9697c14b8dc6 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -1115,28 +1115,4 @@ static struct usb_driver ems_usb_driver = { | |||
1115 | .id_table = ems_usb_table, | 1115 | .id_table = ems_usb_table, |
1116 | }; | 1116 | }; |
1117 | 1117 | ||
1118 | static int __init ems_usb_init(void) | 1118 | module_usb_driver(ems_usb_driver); |
1119 | { | ||
1120 | int err; | ||
1121 | |||
1122 | printk(KERN_INFO "CPC-USB kernel driver loaded\n"); | ||
1123 | |||
1124 | /* register this driver with the USB subsystem */ | ||
1125 | err = usb_register(&ems_usb_driver); | ||
1126 | |||
1127 | if (err) { | ||
1128 | err("usb_register failed. Error number %d\n", err); | ||
1129 | return err; | ||
1130 | } | ||
1131 | |||
1132 | return 0; | ||
1133 | } | ||
1134 | |||
1135 | static void __exit ems_usb_exit(void) | ||
1136 | { | ||
1137 | /* deregister this driver with the USB subsystem */ | ||
1138 | usb_deregister(&ems_usb_driver); | ||
1139 | } | ||
1140 | |||
1141 | module_init(ems_usb_init); | ||
1142 | module_exit(ems_usb_exit); | ||
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index eb8b0e600282..92774637aad8 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c | |||
@@ -1108,25 +1108,4 @@ static struct usb_driver esd_usb2_driver = { | |||
1108 | .id_table = esd_usb2_table, | 1108 | .id_table = esd_usb2_table, |
1109 | }; | 1109 | }; |
1110 | 1110 | ||
1111 | static int __init esd_usb2_init(void) | 1111 | module_usb_driver(esd_usb2_driver); |
1112 | { | ||
1113 | int err; | ||
1114 | |||
1115 | /* register this driver with the USB subsystem */ | ||
1116 | err = usb_register(&esd_usb2_driver); | ||
1117 | |||
1118 | if (err) { | ||
1119 | err("usb_register failed. Error number %d\n", err); | ||
1120 | return err; | ||
1121 | } | ||
1122 | |||
1123 | return 0; | ||
1124 | } | ||
1125 | module_init(esd_usb2_init); | ||
1126 | |||
1127 | static void __exit esd_usb2_exit(void) | ||
1128 | { | ||
1129 | /* deregister this driver with the USB subsystem */ | ||
1130 | usb_deregister(&esd_usb2_driver); | ||
1131 | } | ||
1132 | module_exit(esd_usb2_exit); | ||
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index d9267cb98a23..72f687b40d66 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c | |||
@@ -1914,41 +1914,8 @@ static struct usb_driver irda_driver = { | |||
1914 | #endif | 1914 | #endif |
1915 | }; | 1915 | }; |
1916 | 1916 | ||
1917 | /************************* MODULE CALLBACKS *************************/ | 1917 | module_usb_driver(irda_driver); |
1918 | /* | ||
1919 | * Deal with module insertion/removal | ||
1920 | * Mostly tell USB about our existence | ||
1921 | */ | ||
1922 | |||
1923 | /*------------------------------------------------------------------*/ | ||
1924 | /* | ||
1925 | * Module insertion | ||
1926 | */ | ||
1927 | static int __init usb_irda_init(void) | ||
1928 | { | ||
1929 | int ret; | ||
1930 | |||
1931 | ret = usb_register(&irda_driver); | ||
1932 | if (ret < 0) | ||
1933 | return ret; | ||
1934 | |||
1935 | IRDA_MESSAGE("USB IrDA support registered\n"); | ||
1936 | return 0; | ||
1937 | } | ||
1938 | module_init(usb_irda_init); | ||
1939 | 1918 | ||
1940 | /*------------------------------------------------------------------*/ | ||
1941 | /* | ||
1942 | * Module removal | ||
1943 | */ | ||
1944 | static void __exit usb_irda_cleanup(void) | ||
1945 | { | ||
1946 | /* Deregister the driver and remove all pending instances */ | ||
1947 | usb_deregister(&irda_driver); | ||
1948 | } | ||
1949 | module_exit(usb_irda_cleanup); | ||
1950 | |||
1951 | /*------------------------------------------------------------------*/ | ||
1952 | /* | 1919 | /* |
1953 | * Module parameters | 1920 | * Module parameters |
1954 | */ | 1921 | */ |
diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c index cb90d640007a..79aebeee928c 100644 --- a/drivers/net/irda/kingsun-sir.c +++ b/drivers/net/irda/kingsun-sir.c | |||
@@ -621,24 +621,7 @@ static struct usb_driver irda_driver = { | |||
621 | #endif | 621 | #endif |
622 | }; | 622 | }; |
623 | 623 | ||
624 | /* | 624 | module_usb_driver(irda_driver); |
625 | * Module insertion | ||
626 | */ | ||
627 | static int __init kingsun_init(void) | ||
628 | { | ||
629 | return usb_register(&irda_driver); | ||
630 | } | ||
631 | module_init(kingsun_init); | ||
632 | |||
633 | /* | ||
634 | * Module removal | ||
635 | */ | ||
636 | static void __exit kingsun_cleanup(void) | ||
637 | { | ||
638 | /* Deregister the driver and remove all pending instances */ | ||
639 | usb_deregister(&irda_driver); | ||
640 | } | ||
641 | module_exit(kingsun_cleanup); | ||
642 | 625 | ||
643 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); | 626 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); |
644 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun/DonShine"); | 627 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun/DonShine"); |
diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index 1046014dd6c2..abe689dffc72 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c | |||
@@ -901,26 +901,7 @@ static struct usb_driver irda_driver = { | |||
901 | #endif | 901 | #endif |
902 | }; | 902 | }; |
903 | 903 | ||
904 | /* | 904 | module_usb_driver(irda_driver); |
905 | * Module insertion | ||
906 | */ | ||
907 | static int __init ks959_init(void) | ||
908 | { | ||
909 | return usb_register(&irda_driver); | ||
910 | } | ||
911 | |||
912 | module_init(ks959_init); | ||
913 | |||
914 | /* | ||
915 | * Module removal | ||
916 | */ | ||
917 | static void __exit ks959_cleanup(void) | ||
918 | { | ||
919 | /* Deregister the driver and remove all pending instances */ | ||
920 | usb_deregister(&irda_driver); | ||
921 | } | ||
922 | |||
923 | module_exit(ks959_cleanup); | ||
924 | 905 | ||
925 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); | 906 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); |
926 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun KS-959"); | 907 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun KS-959"); |
diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c index 9cc142fcc712..f8c01088eeb7 100644 --- a/drivers/net/irda/ksdazzle-sir.c +++ b/drivers/net/irda/ksdazzle-sir.c | |||
@@ -796,26 +796,7 @@ static struct usb_driver irda_driver = { | |||
796 | #endif | 796 | #endif |
797 | }; | 797 | }; |
798 | 798 | ||
799 | /* | 799 | module_usb_driver(irda_driver); |
800 | * Module insertion | ||
801 | */ | ||
802 | static int __init ksdazzle_init(void) | ||
803 | { | ||
804 | return usb_register(&irda_driver); | ||
805 | } | ||
806 | |||
807 | module_init(ksdazzle_init); | ||
808 | |||
809 | /* | ||
810 | * Module removal | ||
811 | */ | ||
812 | static void __exit ksdazzle_cleanup(void) | ||
813 | { | ||
814 | /* Deregister the driver and remove all pending instances */ | ||
815 | usb_deregister(&irda_driver); | ||
816 | } | ||
817 | |||
818 | module_exit(ksdazzle_cleanup); | ||
819 | 800 | ||
820 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); | 801 | MODULE_AUTHOR("Alex VillacÃs Lasso <a_villacis@palosanto.com>"); |
821 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun Dazzle"); | 802 | MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun Dazzle"); |
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index be52bfed66a9..1a00b5990cb8 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c | |||
@@ -968,25 +968,4 @@ static void mcs_disconnect(struct usb_interface *intf) | |||
968 | IRDA_DEBUG(0, "MCS7780 now disconnected.\n"); | 968 | IRDA_DEBUG(0, "MCS7780 now disconnected.\n"); |
969 | } | 969 | } |
970 | 970 | ||
971 | /* Module insertion */ | 971 | module_usb_driver(mcs_driver); |
972 | static int __init mcs_init(void) | ||
973 | { | ||
974 | int result; | ||
975 | |||
976 | /* register this driver with the USB subsystem */ | ||
977 | result = usb_register(&mcs_driver); | ||
978 | if (result) | ||
979 | IRDA_ERROR("usb_register failed. Error number %d\n", result); | ||
980 | |||
981 | return result; | ||
982 | } | ||
983 | module_init(mcs_init); | ||
984 | |||
985 | /* Module removal */ | ||
986 | static void __exit mcs_exit(void) | ||
987 | { | ||
988 | /* deregister this driver with the USB subsystem */ | ||
989 | usb_deregister(&mcs_driver); | ||
990 | } | ||
991 | module_exit(mcs_exit); | ||
992 | |||
diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 41c96b3d8152..212868eb6f5f 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c | |||
@@ -1133,21 +1133,4 @@ static struct usb_driver irda_driver = { | |||
1133 | #endif | 1133 | #endif |
1134 | }; | 1134 | }; |
1135 | 1135 | ||
1136 | /* | 1136 | module_usb_driver(irda_driver); |
1137 | * Module insertion | ||
1138 | */ | ||
1139 | static int __init stir_init(void) | ||
1140 | { | ||
1141 | return usb_register(&irda_driver); | ||
1142 | } | ||
1143 | module_init(stir_init); | ||
1144 | |||
1145 | /* | ||
1146 | * Module removal | ||
1147 | */ | ||
1148 | static void __exit stir_cleanup(void) | ||
1149 | { | ||
1150 | /* Deregister the driver and remove all pending instances */ | ||
1151 | usb_deregister(&irda_driver); | ||
1152 | } | ||
1153 | module_exit(stir_cleanup); | ||
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index e81e22e3d1d2..97a1cc7ce684 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c | |||
@@ -1634,17 +1634,7 @@ static struct usb_driver asix_driver = { | |||
1634 | .supports_autosuspend = 1, | 1634 | .supports_autosuspend = 1, |
1635 | }; | 1635 | }; |
1636 | 1636 | ||
1637 | static int __init asix_init(void) | 1637 | module_usb_driver(asix_driver); |
1638 | { | ||
1639 | return usb_register(&asix_driver); | ||
1640 | } | ||
1641 | module_init(asix_init); | ||
1642 | |||
1643 | static void __exit asix_exit(void) | ||
1644 | { | ||
1645 | usb_deregister(&asix_driver); | ||
1646 | } | ||
1647 | module_exit(asix_exit); | ||
1648 | 1638 | ||
1649 | MODULE_AUTHOR("David Hollis"); | 1639 | MODULE_AUTHOR("David Hollis"); |
1650 | MODULE_VERSION(DRIVER_VERSION); | 1640 | MODULE_VERSION(DRIVER_VERSION); |
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index a68272c93381..182cfb4aeb1d 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c | |||
@@ -949,19 +949,4 @@ static struct usb_driver catc_driver = { | |||
949 | .id_table = catc_id_table, | 949 | .id_table = catc_id_table, |
950 | }; | 950 | }; |
951 | 951 | ||
952 | static int __init catc_init(void) | 952 | module_usb_driver(catc_driver); |
953 | { | ||
954 | int result = usb_register(&catc_driver); | ||
955 | if (result == 0) | ||
956 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
957 | DRIVER_DESC "\n"); | ||
958 | return result; | ||
959 | } | ||
960 | |||
961 | static void __exit catc_exit(void) | ||
962 | { | ||
963 | usb_deregister(&catc_driver); | ||
964 | } | ||
965 | |||
966 | module_init(catc_init); | ||
967 | module_exit(catc_exit); | ||
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c index a60d0069cc45..30aedcd55975 100644 --- a/drivers/net/usb/cdc-phonet.c +++ b/drivers/net/usb/cdc-phonet.c | |||
@@ -457,18 +457,7 @@ static struct usb_driver usbpn_driver = { | |||
457 | .id_table = usbpn_ids, | 457 | .id_table = usbpn_ids, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | static int __init usbpn_init(void) | 460 | module_usb_driver(usbpn_driver); |
461 | { | ||
462 | return usb_register(&usbpn_driver); | ||
463 | } | ||
464 | |||
465 | static void __exit usbpn_exit(void) | ||
466 | { | ||
467 | usb_deregister(&usbpn_driver); | ||
468 | } | ||
469 | |||
470 | module_init(usbpn_init); | ||
471 | module_exit(usbpn_exit); | ||
472 | 461 | ||
473 | MODULE_AUTHOR("Remi Denis-Courmont"); | 462 | MODULE_AUTHOR("Remi Denis-Courmont"); |
474 | MODULE_DESCRIPTION("USB CDC Phonet host interface"); | 463 | MODULE_DESCRIPTION("USB CDC Phonet host interface"); |
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 882f53f708df..439690be519f 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c | |||
@@ -369,18 +369,7 @@ static struct usb_driver eem_driver = { | |||
369 | .resume = usbnet_resume, | 369 | .resume = usbnet_resume, |
370 | }; | 370 | }; |
371 | 371 | ||
372 | 372 | module_usb_driver(eem_driver); | |
373 | static int __init eem_init(void) | ||
374 | { | ||
375 | return usb_register(&eem_driver); | ||
376 | } | ||
377 | module_init(eem_init); | ||
378 | |||
379 | static void __exit eem_exit(void) | ||
380 | { | ||
381 | usb_deregister(&eem_driver); | ||
382 | } | ||
383 | module_exit(eem_exit); | ||
384 | 373 | ||
385 | MODULE_AUTHOR("Omar Laazimani <omar.oberthur@gmail.com>"); | 374 | MODULE_AUTHOR("Omar Laazimani <omar.oberthur@gmail.com>"); |
386 | MODULE_DESCRIPTION("USB CDC EEM"); | 375 | MODULE_DESCRIPTION("USB CDC EEM"); |
diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c index c924ea2bce07..26637c354299 100644 --- a/drivers/net/usb/cdc_ether.c +++ b/drivers/net/usb/cdc_ether.c | |||
@@ -425,6 +425,9 @@ int usbnet_cdc_bind(struct usbnet *dev, struct usb_interface *intf) | |||
425 | int status; | 425 | int status; |
426 | struct cdc_state *info = (void *) &dev->data; | 426 | struct cdc_state *info = (void *) &dev->data; |
427 | 427 | ||
428 | BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data) | ||
429 | < sizeof(struct cdc_state))); | ||
430 | |||
428 | status = usbnet_generic_cdc_bind(dev, intf); | 431 | status = usbnet_generic_cdc_bind(dev, intf); |
429 | if (status < 0) | 432 | if (status < 0) |
430 | return status; | 433 | return status; |
@@ -615,21 +618,7 @@ static struct usb_driver cdc_driver = { | |||
615 | .supports_autosuspend = 1, | 618 | .supports_autosuspend = 1, |
616 | }; | 619 | }; |
617 | 620 | ||
618 | 621 | module_usb_driver(cdc_driver); | |
619 | static int __init cdc_init(void) | ||
620 | { | ||
621 | BUILD_BUG_ON((sizeof(((struct usbnet *)0)->data) | ||
622 | < sizeof(struct cdc_state))); | ||
623 | |||
624 | return usb_register(&cdc_driver); | ||
625 | } | ||
626 | module_init(cdc_init); | ||
627 | |||
628 | static void __exit cdc_exit(void) | ||
629 | { | ||
630 | usb_deregister(&cdc_driver); | ||
631 | } | ||
632 | module_exit(cdc_exit); | ||
633 | 622 | ||
634 | MODULE_AUTHOR("David Brownell"); | 623 | MODULE_AUTHOR("David Brownell"); |
635 | MODULE_DESCRIPTION("USB CDC Ethernet devices"); | 624 | MODULE_DESCRIPTION("USB CDC Ethernet devices"); |
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index f06fb78383a1..9904b7ebca2d 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c | |||
@@ -1232,20 +1232,7 @@ static struct ethtool_ops cdc_ncm_ethtool_ops = { | |||
1232 | .nway_reset = usbnet_nway_reset, | 1232 | .nway_reset = usbnet_nway_reset, |
1233 | }; | 1233 | }; |
1234 | 1234 | ||
1235 | static int __init cdc_ncm_init(void) | 1235 | module_usb_driver(cdc_ncm_driver); |
1236 | { | ||
1237 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION "\n"); | ||
1238 | return usb_register(&cdc_ncm_driver); | ||
1239 | } | ||
1240 | |||
1241 | module_init(cdc_ncm_init); | ||
1242 | |||
1243 | static void __exit cdc_ncm_exit(void) | ||
1244 | { | ||
1245 | usb_deregister(&cdc_ncm_driver); | ||
1246 | } | ||
1247 | |||
1248 | module_exit(cdc_ncm_exit); | ||
1249 | 1236 | ||
1250 | MODULE_AUTHOR("Hans Petter Selasky"); | 1237 | MODULE_AUTHOR("Hans Petter Selasky"); |
1251 | MODULE_DESCRIPTION("USB CDC NCM host driver"); | 1238 | MODULE_DESCRIPTION("USB CDC NCM host driver"); |
diff --git a/drivers/net/usb/cdc_subset.c b/drivers/net/usb/cdc_subset.c index fc5f13d47ad9..b403d934e4e3 100644 --- a/drivers/net/usb/cdc_subset.c +++ b/drivers/net/usb/cdc_subset.c | |||
@@ -338,17 +338,7 @@ static struct usb_driver cdc_subset_driver = { | |||
338 | .id_table = products, | 338 | .id_table = products, |
339 | }; | 339 | }; |
340 | 340 | ||
341 | static int __init cdc_subset_init(void) | 341 | module_usb_driver(cdc_subset_driver); |
342 | { | ||
343 | return usb_register(&cdc_subset_driver); | ||
344 | } | ||
345 | module_init(cdc_subset_init); | ||
346 | |||
347 | static void __exit cdc_subset_exit(void) | ||
348 | { | ||
349 | usb_deregister(&cdc_subset_driver); | ||
350 | } | ||
351 | module_exit(cdc_subset_exit); | ||
352 | 342 | ||
353 | MODULE_AUTHOR("David Brownell"); | 343 | MODULE_AUTHOR("David Brownell"); |
354 | MODULE_DESCRIPTION("Simple 'CDC Subset' USB networking links"); | 344 | MODULE_DESCRIPTION("Simple 'CDC Subset' USB networking links"); |
diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c index 8969f124c18c..0e0531356e62 100644 --- a/drivers/net/usb/cx82310_eth.c +++ b/drivers/net/usb/cx82310_eth.c | |||
@@ -329,17 +329,7 @@ static struct usb_driver cx82310_driver = { | |||
329 | .resume = usbnet_resume, | 329 | .resume = usbnet_resume, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | static int __init cx82310_init(void) | 332 | module_usb_driver(cx82310_driver); |
333 | { | ||
334 | return usb_register(&cx82310_driver); | ||
335 | } | ||
336 | module_init(cx82310_init); | ||
337 | |||
338 | static void __exit cx82310_exit(void) | ||
339 | { | ||
340 | usb_deregister(&cx82310_driver); | ||
341 | } | ||
342 | module_exit(cx82310_exit); | ||
343 | 333 | ||
344 | MODULE_AUTHOR("Ondrej Zary"); | 334 | MODULE_AUTHOR("Ondrej Zary"); |
345 | MODULE_DESCRIPTION("Conexant CX82310-based ADSL router USB ethernet driver"); | 335 | MODULE_DESCRIPTION("Conexant CX82310-based ADSL router USB ethernet driver"); |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index fbc0e4def767..b97226318ea5 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -672,18 +672,7 @@ static struct usb_driver dm9601_driver = { | |||
672 | .resume = usbnet_resume, | 672 | .resume = usbnet_resume, |
673 | }; | 673 | }; |
674 | 674 | ||
675 | static int __init dm9601_init(void) | 675 | module_usb_driver(dm9601_driver); |
676 | { | ||
677 | return usb_register(&dm9601_driver); | ||
678 | } | ||
679 | |||
680 | static void __exit dm9601_exit(void) | ||
681 | { | ||
682 | usb_deregister(&dm9601_driver); | ||
683 | } | ||
684 | |||
685 | module_init(dm9601_init); | ||
686 | module_exit(dm9601_exit); | ||
687 | 676 | ||
688 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); | 677 | MODULE_AUTHOR("Peter Korsgaard <jacmet@sunsite.dk>"); |
689 | MODULE_DESCRIPTION("Davicom DM9601 USB 1.1 ethernet devices"); | 678 | MODULE_DESCRIPTION("Davicom DM9601 USB 1.1 ethernet devices"); |
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c index c4cfd1dea881..38266bdae26b 100644 --- a/drivers/net/usb/gl620a.c +++ b/drivers/net/usb/gl620a.c | |||
@@ -227,17 +227,7 @@ static struct usb_driver gl620a_driver = { | |||
227 | .resume = usbnet_resume, | 227 | .resume = usbnet_resume, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __init usbnet_init(void) | 230 | module_usb_driver(gl620a_driver); |
231 | { | ||
232 | return usb_register(&gl620a_driver); | ||
233 | } | ||
234 | module_init(usbnet_init); | ||
235 | |||
236 | static void __exit usbnet_exit(void) | ||
237 | { | ||
238 | usb_deregister(&gl620a_driver); | ||
239 | } | ||
240 | module_exit(usbnet_exit); | ||
241 | 231 | ||
242 | MODULE_AUTHOR("Jiun-Jie Huang"); | 232 | MODULE_AUTHOR("Jiun-Jie Huang"); |
243 | MODULE_DESCRIPTION("GL620-USB-A Host-to-Host Link cables"); | 233 | MODULE_DESCRIPTION("GL620-USB-A Host-to-Host Link cables"); |
diff --git a/drivers/net/usb/int51x1.c b/drivers/net/usb/int51x1.c index 131ac6c172f6..12a22a453ff1 100644 --- a/drivers/net/usb/int51x1.c +++ b/drivers/net/usb/int51x1.c | |||
@@ -238,17 +238,7 @@ static struct usb_driver int51x1_driver = { | |||
238 | .resume = usbnet_resume, | 238 | .resume = usbnet_resume, |
239 | }; | 239 | }; |
240 | 240 | ||
241 | static int __init int51x1_init(void) | 241 | module_usb_driver(int51x1_driver); |
242 | { | ||
243 | return usb_register(&int51x1_driver); | ||
244 | } | ||
245 | module_init(int51x1_init); | ||
246 | |||
247 | static void __exit int51x1_exit(void) | ||
248 | { | ||
249 | usb_deregister(&int51x1_driver); | ||
250 | } | ||
251 | module_exit(int51x1_exit); | ||
252 | 242 | ||
253 | MODULE_AUTHOR("Peter Holik"); | 243 | MODULE_AUTHOR("Peter Holik"); |
254 | MODULE_DESCRIPTION("Intellon usb powerline adapter"); | 244 | MODULE_DESCRIPTION("Intellon usb powerline adapter"); |
diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c index 13c1f044b40d..08a4df238796 100644 --- a/drivers/net/usb/ipheth.c +++ b/drivers/net/usb/ipheth.c | |||
@@ -543,25 +543,7 @@ static struct usb_driver ipheth_driver = { | |||
543 | .id_table = ipheth_table, | 543 | .id_table = ipheth_table, |
544 | }; | 544 | }; |
545 | 545 | ||
546 | static int __init ipheth_init(void) | 546 | module_usb_driver(ipheth_driver); |
547 | { | ||
548 | int retval; | ||
549 | |||
550 | retval = usb_register(&ipheth_driver); | ||
551 | if (retval) { | ||
552 | err("usb_register failed: %d", retval); | ||
553 | return retval; | ||
554 | } | ||
555 | return 0; | ||
556 | } | ||
557 | |||
558 | static void __exit ipheth_exit(void) | ||
559 | { | ||
560 | usb_deregister(&ipheth_driver); | ||
561 | } | ||
562 | |||
563 | module_init(ipheth_init); | ||
564 | module_exit(ipheth_exit); | ||
565 | 547 | ||
566 | MODULE_AUTHOR("Diego Giagio <diego@giagio.com>"); | 548 | MODULE_AUTHOR("Diego Giagio <diego@giagio.com>"); |
567 | MODULE_DESCRIPTION("Apple iPhone USB Ethernet driver"); | 549 | MODULE_DESCRIPTION("Apple iPhone USB Ethernet driver"); |
diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c index 5a6d0f88f43b..7562649b3d6b 100644 --- a/drivers/net/usb/kalmia.c +++ b/drivers/net/usb/kalmia.c | |||
@@ -375,17 +375,7 @@ static struct usb_driver kalmia_driver = { | |||
375 | .resume = usbnet_resume | 375 | .resume = usbnet_resume |
376 | }; | 376 | }; |
377 | 377 | ||
378 | static int __init kalmia_init(void) | 378 | module_usb_driver(kalmia_driver); |
379 | { | ||
380 | return usb_register(&kalmia_driver); | ||
381 | } | ||
382 | module_init( kalmia_init); | ||
383 | |||
384 | static void __exit kalmia_exit(void) | ||
385 | { | ||
386 | usb_deregister(&kalmia_driver); | ||
387 | } | ||
388 | module_exit( kalmia_exit); | ||
389 | 379 | ||
390 | MODULE_AUTHOR("Marius Bjoernstad Kotsbak <marius@kotsbak.com>"); | 380 | MODULE_AUTHOR("Marius Bjoernstad Kotsbak <marius@kotsbak.com>"); |
391 | MODULE_DESCRIPTION("Samsung Kalmia USB network driver"); | 381 | MODULE_DESCRIPTION("Samsung Kalmia USB network driver"); |
diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index 582ca2dfa5f9..d034d9c42548 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c | |||
@@ -1324,32 +1324,4 @@ static int kaweth_internal_control_msg(struct usb_device *usb_dev, | |||
1324 | } | 1324 | } |
1325 | } | 1325 | } |
1326 | 1326 | ||
1327 | 1327 | module_usb_driver(kaweth_driver); | |
1328 | /**************************************************************** | ||
1329 | * kaweth_init | ||
1330 | ****************************************************************/ | ||
1331 | static int __init kaweth_init(void) | ||
1332 | { | ||
1333 | dbg("Driver loading"); | ||
1334 | return usb_register(&kaweth_driver); | ||
1335 | } | ||
1336 | |||
1337 | /**************************************************************** | ||
1338 | * kaweth_exit | ||
1339 | ****************************************************************/ | ||
1340 | static void __exit kaweth_exit(void) | ||
1341 | { | ||
1342 | usb_deregister(&kaweth_driver); | ||
1343 | } | ||
1344 | |||
1345 | module_init(kaweth_init); | ||
1346 | module_exit(kaweth_exit); | ||
1347 | |||
1348 | |||
1349 | |||
1350 | |||
1351 | |||
1352 | |||
1353 | |||
1354 | |||
1355 | |||
diff --git a/drivers/net/usb/lg-vl600.c b/drivers/net/usb/lg-vl600.c index d43db32f9478..497db19f8cf8 100644 --- a/drivers/net/usb/lg-vl600.c +++ b/drivers/net/usb/lg-vl600.c | |||
@@ -349,17 +349,7 @@ static struct usb_driver lg_vl600_driver = { | |||
349 | .resume = usbnet_resume, | 349 | .resume = usbnet_resume, |
350 | }; | 350 | }; |
351 | 351 | ||
352 | static int __init vl600_init(void) | 352 | module_usb_driver(lg_vl600_driver); |
353 | { | ||
354 | return usb_register(&lg_vl600_driver); | ||
355 | } | ||
356 | module_init(vl600_init); | ||
357 | |||
358 | static void __exit vl600_exit(void) | ||
359 | { | ||
360 | usb_deregister(&lg_vl600_driver); | ||
361 | } | ||
362 | module_exit(vl600_exit); | ||
363 | 353 | ||
364 | MODULE_AUTHOR("Anrzej Zaborowski"); | 354 | MODULE_AUTHOR("Anrzej Zaborowski"); |
365 | MODULE_DESCRIPTION("LG-VL600 modem's ethernet link"); | 355 | MODULE_DESCRIPTION("LG-VL600 modem's ethernet link"); |
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c index db2cb74bf854..a29aa9cf9f6e 100644 --- a/drivers/net/usb/mcs7830.c +++ b/drivers/net/usb/mcs7830.c | |||
@@ -692,17 +692,7 @@ static struct usb_driver mcs7830_driver = { | |||
692 | .reset_resume = mcs7830_reset_resume, | 692 | .reset_resume = mcs7830_reset_resume, |
693 | }; | 693 | }; |
694 | 694 | ||
695 | static int __init mcs7830_init(void) | 695 | module_usb_driver(mcs7830_driver); |
696 | { | ||
697 | return usb_register(&mcs7830_driver); | ||
698 | } | ||
699 | module_init(mcs7830_init); | ||
700 | |||
701 | static void __exit mcs7830_exit(void) | ||
702 | { | ||
703 | usb_deregister(&mcs7830_driver); | ||
704 | } | ||
705 | module_exit(mcs7830_exit); | ||
706 | 696 | ||
707 | MODULE_DESCRIPTION("USB to network adapter MCS7830)"); | 697 | MODULE_DESCRIPTION("USB to network adapter MCS7830)"); |
708 | MODULE_LICENSE("GPL"); | 698 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c index 01db4602a39e..83f965cb69e7 100644 --- a/drivers/net/usb/net1080.c +++ b/drivers/net/usb/net1080.c | |||
@@ -589,17 +589,7 @@ static struct usb_driver net1080_driver = { | |||
589 | .resume = usbnet_resume, | 589 | .resume = usbnet_resume, |
590 | }; | 590 | }; |
591 | 591 | ||
592 | static int __init net1080_init(void) | 592 | module_usb_driver(net1080_driver); |
593 | { | ||
594 | return usb_register(&net1080_driver); | ||
595 | } | ||
596 | module_init(net1080_init); | ||
597 | |||
598 | static void __exit net1080_exit(void) | ||
599 | { | ||
600 | usb_deregister(&net1080_driver); | ||
601 | } | ||
602 | module_exit(net1080_exit); | ||
603 | 593 | ||
604 | MODULE_AUTHOR("David Brownell"); | 594 | MODULE_AUTHOR("David Brownell"); |
605 | MODULE_DESCRIPTION("NetChip 1080 based USB Host-to-Host Links"); | 595 | MODULE_DESCRIPTION("NetChip 1080 based USB Host-to-Host Links"); |
diff --git a/drivers/net/usb/plusb.c b/drivers/net/usb/plusb.c index 217aec8a768f..b2b035e29978 100644 --- a/drivers/net/usb/plusb.c +++ b/drivers/net/usb/plusb.c | |||
@@ -154,17 +154,7 @@ static struct usb_driver plusb_driver = { | |||
154 | .resume = usbnet_resume, | 154 | .resume = usbnet_resume, |
155 | }; | 155 | }; |
156 | 156 | ||
157 | static int __init plusb_init(void) | 157 | module_usb_driver(plusb_driver); |
158 | { | ||
159 | return usb_register(&plusb_driver); | ||
160 | } | ||
161 | module_init(plusb_init); | ||
162 | |||
163 | static void __exit plusb_exit(void) | ||
164 | { | ||
165 | usb_deregister(&plusb_driver); | ||
166 | } | ||
167 | module_exit(plusb_exit); | ||
168 | 158 | ||
169 | MODULE_AUTHOR("David Brownell"); | 159 | MODULE_AUTHOR("David Brownell"); |
170 | MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver"); | 160 | MODULE_DESCRIPTION("Prolific PL-2301/2302/25A1 USB Host to Host Link Driver"); |
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c index 255d6a424a6b..c8f1b5b3aff3 100644 --- a/drivers/net/usb/rndis_host.c +++ b/drivers/net/usb/rndis_host.c | |||
@@ -635,17 +635,7 @@ static struct usb_driver rndis_driver = { | |||
635 | .resume = usbnet_resume, | 635 | .resume = usbnet_resume, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | static int __init rndis_init(void) | 638 | module_usb_driver(rndis_driver); |
639 | { | ||
640 | return usb_register(&rndis_driver); | ||
641 | } | ||
642 | module_init(rndis_init); | ||
643 | |||
644 | static void __exit rndis_exit(void) | ||
645 | { | ||
646 | usb_deregister(&rndis_driver); | ||
647 | } | ||
648 | module_exit(rndis_exit); | ||
649 | 639 | ||
650 | MODULE_AUTHOR("David Brownell"); | 640 | MODULE_AUTHOR("David Brownell"); |
651 | MODULE_DESCRIPTION("USB Host side RNDIS driver"); | 641 | MODULE_DESCRIPTION("USB Host side RNDIS driver"); |
diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index bf8c84d0adf2..0710b4ca9252 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c | |||
@@ -978,20 +978,7 @@ static struct usb_driver rtl8150_driver = { | |||
978 | .resume = rtl8150_resume | 978 | .resume = rtl8150_resume |
979 | }; | 979 | }; |
980 | 980 | ||
981 | static int __init usb_rtl8150_init(void) | 981 | module_usb_driver(rtl8150_driver); |
982 | { | ||
983 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
984 | DRIVER_DESC "\n"); | ||
985 | return usb_register(&rtl8150_driver); | ||
986 | } | ||
987 | |||
988 | static void __exit usb_rtl8150_exit(void) | ||
989 | { | ||
990 | usb_deregister(&rtl8150_driver); | ||
991 | } | ||
992 | |||
993 | module_init(usb_rtl8150_init); | ||
994 | module_exit(usb_rtl8150_exit); | ||
995 | 982 | ||
996 | MODULE_AUTHOR(DRIVER_AUTHOR); | 983 | MODULE_AUTHOR(DRIVER_AUTHOR); |
997 | MODULE_DESCRIPTION(DRIVER_DESC); | 984 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/net/usb/sierra_net.c b/drivers/net/usb/sierra_net.c index ed1b43210584..e45dfdcb8718 100644 --- a/drivers/net/usb/sierra_net.c +++ b/drivers/net/usb/sierra_net.c | |||
@@ -900,6 +900,9 @@ struct sk_buff *sierra_net_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | |||
900 | u16 len; | 900 | u16 len; |
901 | bool need_tail; | 901 | bool need_tail; |
902 | 902 | ||
903 | BUILD_BUG_ON(FIELD_SIZEOF(struct usbnet, data) | ||
904 | < sizeof(struct cdc_state)); | ||
905 | |||
903 | dev_dbg(&dev->udev->dev, "%s", __func__); | 906 | dev_dbg(&dev->udev->dev, "%s", __func__); |
904 | if (priv->link_up && check_ethip_packet(skb, dev) && is_ip(skb)) { | 907 | if (priv->link_up && check_ethip_packet(skb, dev) && is_ip(skb)) { |
905 | /* enough head room as is? */ | 908 | /* enough head room as is? */ |
@@ -981,21 +984,7 @@ static struct usb_driver sierra_net_driver = { | |||
981 | .no_dynamic_id = 1, | 984 | .no_dynamic_id = 1, |
982 | }; | 985 | }; |
983 | 986 | ||
984 | static int __init sierra_net_init(void) | 987 | module_usb_driver(sierra_net_driver); |
985 | { | ||
986 | BUILD_BUG_ON(FIELD_SIZEOF(struct usbnet, data) | ||
987 | < sizeof(struct cdc_state)); | ||
988 | |||
989 | return usb_register(&sierra_net_driver); | ||
990 | } | ||
991 | |||
992 | static void __exit sierra_net_exit(void) | ||
993 | { | ||
994 | usb_deregister(&sierra_net_driver); | ||
995 | } | ||
996 | |||
997 | module_exit(sierra_net_exit); | ||
998 | module_init(sierra_net_init); | ||
999 | 988 | ||
1000 | MODULE_AUTHOR(DRIVER_AUTHOR); | 989 | MODULE_AUTHOR(DRIVER_AUTHOR); |
1001 | MODULE_DESCRIPTION(DRIVER_DESC); | 990 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c index 22a7cf951e72..9741b24f0668 100644 --- a/drivers/net/usb/smsc75xx.c +++ b/drivers/net/usb/smsc75xx.c | |||
@@ -1236,17 +1236,7 @@ static struct usb_driver smsc75xx_driver = { | |||
1236 | .disconnect = usbnet_disconnect, | 1236 | .disconnect = usbnet_disconnect, |
1237 | }; | 1237 | }; |
1238 | 1238 | ||
1239 | static int __init smsc75xx_init(void) | 1239 | module_usb_driver(smsc75xx_driver); |
1240 | { | ||
1241 | return usb_register(&smsc75xx_driver); | ||
1242 | } | ||
1243 | module_init(smsc75xx_init); | ||
1244 | |||
1245 | static void __exit smsc75xx_exit(void) | ||
1246 | { | ||
1247 | usb_deregister(&smsc75xx_driver); | ||
1248 | } | ||
1249 | module_exit(smsc75xx_exit); | ||
1250 | 1240 | ||
1251 | MODULE_AUTHOR("Nancy Lin"); | 1241 | MODULE_AUTHOR("Nancy Lin"); |
1252 | MODULE_AUTHOR("Steve Glendinning <steve.glendinning@smsc.com>"); | 1242 | MODULE_AUTHOR("Steve Glendinning <steve.glendinning@smsc.com>"); |
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index eff67678c5a6..4a107610ac43 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c | |||
@@ -1297,17 +1297,7 @@ static struct usb_driver smsc95xx_driver = { | |||
1297 | .disconnect = usbnet_disconnect, | 1297 | .disconnect = usbnet_disconnect, |
1298 | }; | 1298 | }; |
1299 | 1299 | ||
1300 | static int __init smsc95xx_init(void) | 1300 | module_usb_driver(smsc95xx_driver); |
1301 | { | ||
1302 | return usb_register(&smsc95xx_driver); | ||
1303 | } | ||
1304 | module_init(smsc95xx_init); | ||
1305 | |||
1306 | static void __exit smsc95xx_exit(void) | ||
1307 | { | ||
1308 | usb_deregister(&smsc95xx_driver); | ||
1309 | } | ||
1310 | module_exit(smsc95xx_exit); | ||
1311 | 1301 | ||
1312 | MODULE_AUTHOR("Nancy Lin"); | 1302 | MODULE_AUTHOR("Nancy Lin"); |
1313 | MODULE_AUTHOR("Steve Glendinning <steve.glendinning@smsc.com>"); | 1303 | MODULE_AUTHOR("Steve Glendinning <steve.glendinning@smsc.com>"); |
diff --git a/drivers/net/usb/zaurus.c b/drivers/net/usb/zaurus.c index 1a2234c20514..f701d4127087 100644 --- a/drivers/net/usb/zaurus.c +++ b/drivers/net/usb/zaurus.c | |||
@@ -362,17 +362,7 @@ static struct usb_driver zaurus_driver = { | |||
362 | .resume = usbnet_resume, | 362 | .resume = usbnet_resume, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | static int __init zaurus_init(void) | 365 | module_usb_driver(zaurus_driver); |
366 | { | ||
367 | return usb_register(&zaurus_driver); | ||
368 | } | ||
369 | module_init(zaurus_init); | ||
370 | |||
371 | static void __exit zaurus_exit(void) | ||
372 | { | ||
373 | usb_deregister(&zaurus_driver); | ||
374 | } | ||
375 | module_exit(zaurus_exit); | ||
376 | 366 | ||
377 | MODULE_AUTHOR("Pavel Machek, David Brownell"); | 367 | MODULE_AUTHOR("Pavel Machek, David Brownell"); |
378 | MODULE_DESCRIPTION("Sharp Zaurus PDA, and compatible products"); | 368 | MODULE_DESCRIPTION("Sharp Zaurus PDA, and compatible products"); |
diff --git a/drivers/net/wireless/ath/carl9170/usb.c b/drivers/net/wireless/ath/carl9170/usb.c index 333b69ef2ae2..89821e4835c7 100644 --- a/drivers/net/wireless/ath/carl9170/usb.c +++ b/drivers/net/wireless/ath/carl9170/usb.c | |||
@@ -1161,15 +1161,4 @@ static struct usb_driver carl9170_driver = { | |||
1161 | #endif /* CONFIG_PM */ | 1161 | #endif /* CONFIG_PM */ |
1162 | }; | 1162 | }; |
1163 | 1163 | ||
1164 | static int __init carl9170_usb_init(void) | 1164 | module_usb_driver(carl9170_driver); |
1165 | { | ||
1166 | return usb_register(&carl9170_driver); | ||
1167 | } | ||
1168 | |||
1169 | static void __exit carl9170_usb_exit(void) | ||
1170 | { | ||
1171 | usb_deregister(&carl9170_driver); | ||
1172 | } | ||
1173 | |||
1174 | module_init(carl9170_usb_init); | ||
1175 | module_exit(carl9170_usb_exit); | ||
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index db879c364ebf..b5fbbc7947df 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -1184,29 +1184,7 @@ static struct usb_driver if_usb_driver = { | |||
1184 | .reset_resume = if_usb_resume, | 1184 | .reset_resume = if_usb_resume, |
1185 | }; | 1185 | }; |
1186 | 1186 | ||
1187 | static int __init if_usb_init_module(void) | 1187 | module_usb_driver(if_usb_driver); |
1188 | { | ||
1189 | int ret = 0; | ||
1190 | |||
1191 | lbs_deb_enter(LBS_DEB_MAIN); | ||
1192 | |||
1193 | ret = usb_register(&if_usb_driver); | ||
1194 | |||
1195 | lbs_deb_leave_args(LBS_DEB_MAIN, "ret %d", ret); | ||
1196 | return ret; | ||
1197 | } | ||
1198 | |||
1199 | static void __exit if_usb_exit_module(void) | ||
1200 | { | ||
1201 | lbs_deb_enter(LBS_DEB_MAIN); | ||
1202 | |||
1203 | usb_deregister(&if_usb_driver); | ||
1204 | |||
1205 | lbs_deb_leave(LBS_DEB_MAIN); | ||
1206 | } | ||
1207 | |||
1208 | module_init(if_usb_init_module); | ||
1209 | module_exit(if_usb_exit_module); | ||
1210 | 1188 | ||
1211 | MODULE_DESCRIPTION("8388 USB WLAN Driver"); | 1189 | MODULE_DESCRIPTION("8388 USB WLAN Driver"); |
1212 | MODULE_AUTHOR("Marvell International Ltd. and Red Hat, Inc."); | 1190 | MODULE_AUTHOR("Marvell International Ltd. and Red Hat, Inc."); |
diff --git a/drivers/net/wireless/libertas_tf/if_usb.c b/drivers/net/wireless/libertas_tf/if_usb.c index 68202e63873a..aff8b5743af0 100644 --- a/drivers/net/wireless/libertas_tf/if_usb.c +++ b/drivers/net/wireless/libertas_tf/if_usb.c | |||
@@ -924,27 +924,7 @@ static struct usb_driver if_usb_driver = { | |||
924 | .resume = if_usb_resume, | 924 | .resume = if_usb_resume, |
925 | }; | 925 | }; |
926 | 926 | ||
927 | static int __init if_usb_init_module(void) | 927 | module_usb_driver(if_usb_driver); |
928 | { | ||
929 | int ret = 0; | ||
930 | |||
931 | lbtf_deb_enter(LBTF_DEB_MAIN); | ||
932 | |||
933 | ret = usb_register(&if_usb_driver); | ||
934 | |||
935 | lbtf_deb_leave_args(LBTF_DEB_MAIN, "ret %d", ret); | ||
936 | return ret; | ||
937 | } | ||
938 | |||
939 | static void __exit if_usb_exit_module(void) | ||
940 | { | ||
941 | lbtf_deb_enter(LBTF_DEB_MAIN); | ||
942 | usb_deregister(&if_usb_driver); | ||
943 | lbtf_deb_leave(LBTF_DEB_MAIN); | ||
944 | } | ||
945 | |||
946 | module_init(if_usb_init_module); | ||
947 | module_exit(if_usb_exit_module); | ||
948 | 928 | ||
949 | MODULE_DESCRIPTION("8388 USB WLAN Thinfirm Driver"); | 929 | MODULE_DESCRIPTION("8388 USB WLAN Thinfirm Driver"); |
950 | MODULE_AUTHOR("Cozybit Inc."); | 930 | MODULE_AUTHOR("Cozybit Inc."); |
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c index 0793e4265b43..ae8ce56670b6 100644 --- a/drivers/net/wireless/orinoco/orinoco_usb.c +++ b/drivers/net/wireless/orinoco/orinoco_usb.c | |||
@@ -1759,32 +1759,7 @@ static struct usb_driver orinoco_driver = { | |||
1759 | static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION | 1759 | static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION |
1760 | " (Manuel Estrada Sainz)"; | 1760 | " (Manuel Estrada Sainz)"; |
1761 | 1761 | ||
1762 | static int __init ezusb_module_init(void) | 1762 | module_usb_driver(orinoco_driver); |
1763 | { | ||
1764 | int err; | ||
1765 | |||
1766 | printk(KERN_DEBUG "%s\n", version); | ||
1767 | |||
1768 | /* register this driver with the USB subsystem */ | ||
1769 | err = usb_register(&orinoco_driver); | ||
1770 | if (err < 0) { | ||
1771 | printk(KERN_ERR PFX "usb_register failed, error %d\n", | ||
1772 | err); | ||
1773 | return err; | ||
1774 | } | ||
1775 | |||
1776 | return 0; | ||
1777 | } | ||
1778 | |||
1779 | static void __exit ezusb_module_exit(void) | ||
1780 | { | ||
1781 | /* deregister this driver with the USB subsystem */ | ||
1782 | usb_deregister(&orinoco_driver); | ||
1783 | } | ||
1784 | |||
1785 | |||
1786 | module_init(ezusb_module_init); | ||
1787 | module_exit(ezusb_module_exit); | ||
1788 | 1763 | ||
1789 | MODULE_AUTHOR("Manuel Estrada Sainz"); | 1764 | MODULE_AUTHOR("Manuel Estrada Sainz"); |
1790 | MODULE_DESCRIPTION("Driver for Orinoco wireless LAN cards using EZUSB bridge"); | 1765 | MODULE_DESCRIPTION("Driver for Orinoco wireless LAN cards using EZUSB bridge"); |
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 9b6096866427..f4d28c39aac7 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -1083,15 +1083,4 @@ static struct usb_driver p54u_driver = { | |||
1083 | .soft_unbind = 1, | 1083 | .soft_unbind = 1, |
1084 | }; | 1084 | }; |
1085 | 1085 | ||
1086 | static int __init p54u_init(void) | 1086 | module_usb_driver(p54u_driver); |
1087 | { | ||
1088 | return usb_register(&p54u_driver); | ||
1089 | } | ||
1090 | |||
1091 | static void __exit p54u_exit(void) | ||
1092 | { | ||
1093 | usb_deregister(&p54u_driver); | ||
1094 | } | ||
1095 | |||
1096 | module_init(p54u_init); | ||
1097 | module_exit(p54u_exit); | ||
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 0c13840a7de5..85370a7dfa8b 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -3754,17 +3754,7 @@ static struct usb_driver rndis_wlan_driver = { | |||
3754 | .resume = usbnet_resume, | 3754 | .resume = usbnet_resume, |
3755 | }; | 3755 | }; |
3756 | 3756 | ||
3757 | static int __init rndis_wlan_init(void) | 3757 | module_usb_driver(rndis_wlan_driver); |
3758 | { | ||
3759 | return usb_register(&rndis_wlan_driver); | ||
3760 | } | ||
3761 | module_init(rndis_wlan_init); | ||
3762 | |||
3763 | static void __exit rndis_wlan_exit(void) | ||
3764 | { | ||
3765 | usb_deregister(&rndis_wlan_driver); | ||
3766 | } | ||
3767 | module_exit(rndis_wlan_exit); | ||
3768 | 3758 | ||
3769 | MODULE_AUTHOR("Bjorge Dijkstra"); | 3759 | MODULE_AUTHOR("Bjorge Dijkstra"); |
3770 | MODULE_AUTHOR("Jussi Kivilinna"); | 3760 | MODULE_AUTHOR("Jussi Kivilinna"); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 53c5f878f61d..b31f38d41a47 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1982,15 +1982,4 @@ static struct usb_driver rt2500usb_driver = { | |||
1982 | .resume = rt2x00usb_resume, | 1982 | .resume = rt2x00usb_resume, |
1983 | }; | 1983 | }; |
1984 | 1984 | ||
1985 | static int __init rt2500usb_init(void) | 1985 | module_usb_driver(rt2500usb_driver); |
1986 | { | ||
1987 | return usb_register(&rt2500usb_driver); | ||
1988 | } | ||
1989 | |||
1990 | static void __exit rt2500usb_exit(void) | ||
1991 | { | ||
1992 | usb_deregister(&rt2500usb_driver); | ||
1993 | } | ||
1994 | |||
1995 | module_init(rt2500usb_init); | ||
1996 | module_exit(rt2500usb_exit); | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index f1565792f270..78550a7f689c 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -1233,15 +1233,4 @@ static struct usb_driver rt2800usb_driver = { | |||
1233 | .resume = rt2x00usb_resume, | 1233 | .resume = rt2x00usb_resume, |
1234 | }; | 1234 | }; |
1235 | 1235 | ||
1236 | static int __init rt2800usb_init(void) | 1236 | module_usb_driver(rt2800usb_driver); |
1237 | { | ||
1238 | return usb_register(&rt2800usb_driver); | ||
1239 | } | ||
1240 | |||
1241 | static void __exit rt2800usb_exit(void) | ||
1242 | { | ||
1243 | usb_deregister(&rt2800usb_driver); | ||
1244 | } | ||
1245 | |||
1246 | module_init(rt2800usb_init); | ||
1247 | module_exit(rt2800usb_exit); | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index cfb19dbb0a67..0e5a10179182 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -2528,15 +2528,4 @@ static struct usb_driver rt73usb_driver = { | |||
2528 | .resume = rt2x00usb_resume, | 2528 | .resume = rt2x00usb_resume, |
2529 | }; | 2529 | }; |
2530 | 2530 | ||
2531 | static int __init rt73usb_init(void) | 2531 | module_usb_driver(rt73usb_driver); |
2532 | { | ||
2533 | return usb_register(&rt73usb_driver); | ||
2534 | } | ||
2535 | |||
2536 | static void __exit rt73usb_exit(void) | ||
2537 | { | ||
2538 | usb_deregister(&rt73usb_driver); | ||
2539 | } | ||
2540 | |||
2541 | module_init(rt73usb_init); | ||
2542 | module_exit(rt73usb_exit); | ||
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c index 4a78f9e39dfa..638fbef693e6 100644 --- a/drivers/net/wireless/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c | |||
@@ -1592,15 +1592,4 @@ static struct usb_driver rtl8187_driver = { | |||
1592 | .disconnect = __devexit_p(rtl8187_disconnect), | 1592 | .disconnect = __devexit_p(rtl8187_disconnect), |
1593 | }; | 1593 | }; |
1594 | 1594 | ||
1595 | static int __init rtl8187_init(void) | 1595 | module_usb_driver(rtl8187_driver); |
1596 | { | ||
1597 | return usb_register(&rtl8187_driver); | ||
1598 | } | ||
1599 | |||
1600 | static void __exit rtl8187_exit(void) | ||
1601 | { | ||
1602 | usb_deregister(&rtl8187_driver); | ||
1603 | } | ||
1604 | |||
1605 | module_init(rtl8187_init); | ||
1606 | module_exit(rtl8187_exit); | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c index c244f2f1b83f..674cd1a486c5 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | |||
@@ -356,15 +356,4 @@ static struct usb_driver rtl8192cu_driver = { | |||
356 | #endif | 356 | #endif |
357 | }; | 357 | }; |
358 | 358 | ||
359 | static int __init rtl8192cu_init(void) | 359 | module_usb_driver(rtl8192cu_driver); |
360 | { | ||
361 | return usb_register(&rtl8192cu_driver); | ||
362 | } | ||
363 | |||
364 | static void __exit rtl8192cu_exit(void) | ||
365 | { | ||
366 | usb_deregister(&rtl8192cu_driver); | ||
367 | } | ||
368 | |||
369 | module_init(rtl8192cu_init); | ||
370 | module_exit(rtl8192cu_exit); | ||
diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index 8efa2f2d9579..a66b93b7ff9a 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c | |||
@@ -1907,15 +1907,4 @@ static struct usb_driver zd1201_usb = { | |||
1907 | .resume = zd1201_resume, | 1907 | .resume = zd1201_resume, |
1908 | }; | 1908 | }; |
1909 | 1909 | ||
1910 | static int __init zd1201_init(void) | 1910 | module_usb_driver(zd1201_usb); |
1911 | { | ||
1912 | return usb_register(&zd1201_usb); | ||
1913 | } | ||
1914 | |||
1915 | static void __exit zd1201_cleanup(void) | ||
1916 | { | ||
1917 | usb_deregister(&zd1201_usb); | ||
1918 | } | ||
1919 | |||
1920 | module_init(zd1201_init); | ||
1921 | module_exit(zd1201_cleanup); | ||