diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:34:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:34:02 -0500 |
commit | 65db43054065790a75291b0834657445fea2cf56 (patch) | |
tree | 000b010ed36dc99c4695178a6cb8a797a3d24865 /drivers/usb/storage | |
parent | f3a6a4b6cfc80e57bf16bb12f9425bec1a5731a9 (diff) |
USB: convert drivers/usb/* to use module_usb_driver()
This converts the drivers in drivers/usb/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.
Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.
Cc: Simon Arlott <cxacru@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@free.fr>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Juergen Stuber <starblue@users.sourceforge.net>
Cc: Cesar Miquel <miquel@df.uba.ar>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Michael Hund <mhund@ld-didactic.de>
Cc: Zack Parsons <k3bacon@gmail.com>
Cc: Melchior FRANZ <mfranz@aon.at>
Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/storage')
-rw-r--r-- | drivers/usb/storage/alauda.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/cypress_atacb.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/datafab.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/ene_ub6250.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/freecom.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/isd200.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/jumpshot.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/karma.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/onetouch.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/realtek_cr.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/sddr09.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/sddr55.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/shuttle_usbat.c | 13 | ||||
-rw-r--r-- | drivers/usb/storage/uas.c | 13 |
14 files changed, 14 insertions, 168 deletions
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 4dca3ef0668c..5929f49d0b43 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c | |||
@@ -2410,15 +2410,4 @@ static struct usb_driver ene_ub6250_driver = { | |||
2410 | .soft_unbind = 1, | 2410 | .soft_unbind = 1, |
2411 | }; | 2411 | }; |
2412 | 2412 | ||
2413 | static int __init ene_ub6250_init(void) | 2413 | module_usb_driver(ene_ub6250_driver); |
2414 | { | ||
2415 | return usb_register(&ene_ub6250_driver); | ||
2416 | } | ||
2417 | |||
2418 | static void __exit ene_ub6250_exit(void) | ||
2419 | { | ||
2420 | usb_deregister(&ene_ub6250_driver); | ||
2421 | } | ||
2422 | |||
2423 | module_init(ene_ub6250_init); | ||
2424 | 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"); |