diff options
-rw-r--r-- | drivers/char/hw_random/nomadik-rng.c | 13 | ||||
-rw-r--r-- | drivers/dma/pl330.c | 13 | ||||
-rw-r--r-- | drivers/input/serio/ambakmi.c | 13 | ||||
-rw-r--r-- | drivers/mmc/host/mmci.c | 12 | ||||
-rw-r--r-- | drivers/rtc/rtc-pl030.c | 13 | ||||
-rw-r--r-- | drivers/rtc/rtc-pl031.c | 13 | ||||
-rw-r--r-- | drivers/watchdog/sp805_wdt.c | 12 | ||||
-rw-r--r-- | include/linux/amba/bus.h | 9 | ||||
-rw-r--r-- | sound/arm/aaci.c | 13 |
9 files changed, 17 insertions, 94 deletions
diff --git a/drivers/char/hw_random/nomadik-rng.c b/drivers/char/hw_random/nomadik-rng.c index 3d3c1e6703b4..96de0249e595 100644 --- a/drivers/char/hw_random/nomadik-rng.c +++ b/drivers/char/hw_random/nomadik-rng.c | |||
@@ -107,17 +107,6 @@ static struct amba_driver nmk_rng_driver = { | |||
107 | .id_table = nmk_rng_ids, | 107 | .id_table = nmk_rng_ids, |
108 | }; | 108 | }; |
109 | 109 | ||
110 | static int __init nmk_rng_init(void) | 110 | module_amba_driver(nmk_rng_driver); |
111 | { | ||
112 | return amba_driver_register(&nmk_rng_driver); | ||
113 | } | ||
114 | |||
115 | static void __devexit nmk_rng_exit(void) | ||
116 | { | ||
117 | amba_driver_unregister(&nmk_rng_driver); | ||
118 | } | ||
119 | |||
120 | module_init(nmk_rng_init); | ||
121 | module_exit(nmk_rng_exit); | ||
122 | 111 | ||
123 | MODULE_LICENSE("GPL"); | 112 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index b8ec03ee8e22..16b66c827f19 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -1035,18 +1035,7 @@ static struct amba_driver pl330_driver = { | |||
1035 | .remove = pl330_remove, | 1035 | .remove = pl330_remove, |
1036 | }; | 1036 | }; |
1037 | 1037 | ||
1038 | static int __init pl330_init(void) | 1038 | module_amba_driver(pl330_driver); |
1039 | { | ||
1040 | return amba_driver_register(&pl330_driver); | ||
1041 | } | ||
1042 | module_init(pl330_init); | ||
1043 | |||
1044 | static void __exit pl330_exit(void) | ||
1045 | { | ||
1046 | amba_driver_unregister(&pl330_driver); | ||
1047 | return; | ||
1048 | } | ||
1049 | module_exit(pl330_exit); | ||
1050 | 1039 | ||
1051 | MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>"); | 1040 | MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>"); |
1052 | MODULE_DESCRIPTION("API Driver for PL330 DMAC"); | 1041 | MODULE_DESCRIPTION("API Driver for PL330 DMAC"); |
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index 8407d5b0ced8..2ffd110bd5bc 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -208,18 +208,7 @@ static struct amba_driver ambakmi_driver = { | |||
208 | .resume = amba_kmi_resume, | 208 | .resume = amba_kmi_resume, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | static int __init amba_kmi_init(void) | 211 | module_amba_driver(ambakmi_driver); |
212 | { | ||
213 | return amba_driver_register(&ambakmi_driver); | ||
214 | } | ||
215 | |||
216 | static void __exit amba_kmi_exit(void) | ||
217 | { | ||
218 | amba_driver_unregister(&ambakmi_driver); | ||
219 | } | ||
220 | |||
221 | module_init(amba_kmi_init); | ||
222 | module_exit(amba_kmi_exit); | ||
223 | 212 | ||
224 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 213 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
225 | MODULE_DESCRIPTION("AMBA KMI controller driver"); | 214 | MODULE_DESCRIPTION("AMBA KMI controller driver"); |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 304f2f98b680..6692392c05dd 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -1519,18 +1519,8 @@ static struct amba_driver mmci_driver = { | |||
1519 | .id_table = mmci_ids, | 1519 | .id_table = mmci_ids, |
1520 | }; | 1520 | }; |
1521 | 1521 | ||
1522 | static int __init mmci_init(void) | 1522 | module_amba_driver(mmci_driver); |
1523 | { | ||
1524 | return amba_driver_register(&mmci_driver); | ||
1525 | } | ||
1526 | |||
1527 | static void __exit mmci_exit(void) | ||
1528 | { | ||
1529 | amba_driver_unregister(&mmci_driver); | ||
1530 | } | ||
1531 | 1523 | ||
1532 | module_init(mmci_init); | ||
1533 | module_exit(mmci_exit); | ||
1534 | module_param(fmax, uint, 0444); | 1524 | module_param(fmax, uint, 0444); |
1535 | 1525 | ||
1536 | MODULE_DESCRIPTION("ARM PrimeCell PL180/181 Multimedia Card Interface driver"); | 1526 | MODULE_DESCRIPTION("ARM PrimeCell PL180/181 Multimedia Card Interface driver"); |
diff --git a/drivers/rtc/rtc-pl030.c b/drivers/rtc/rtc-pl030.c index 02111fee077e..b2d3d20baebc 100644 --- a/drivers/rtc/rtc-pl030.c +++ b/drivers/rtc/rtc-pl030.c | |||
@@ -185,18 +185,7 @@ static struct amba_driver pl030_driver = { | |||
185 | .id_table = pl030_ids, | 185 | .id_table = pl030_ids, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | static int __init pl030_init(void) | 188 | module_amba_driver(pl030_driver); |
189 | { | ||
190 | return amba_driver_register(&pl030_driver); | ||
191 | } | ||
192 | |||
193 | static void __exit pl030_exit(void) | ||
194 | { | ||
195 | amba_driver_unregister(&pl030_driver); | ||
196 | } | ||
197 | |||
198 | module_init(pl030_init); | ||
199 | module_exit(pl030_exit); | ||
200 | 189 | ||
201 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); | 190 | MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); |
202 | MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); | 191 | MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); |
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c index a952c8de1dd7..359e2c53c545 100644 --- a/drivers/rtc/rtc-pl031.c +++ b/drivers/rtc/rtc-pl031.c | |||
@@ -431,18 +431,7 @@ static struct amba_driver pl031_driver = { | |||
431 | .remove = pl031_remove, | 431 | .remove = pl031_remove, |
432 | }; | 432 | }; |
433 | 433 | ||
434 | static int __init pl031_init(void) | 434 | module_amba_driver(pl031_driver); |
435 | { | ||
436 | return amba_driver_register(&pl031_driver); | ||
437 | } | ||
438 | |||
439 | static void __exit pl031_exit(void) | ||
440 | { | ||
441 | amba_driver_unregister(&pl031_driver); | ||
442 | } | ||
443 | |||
444 | module_init(pl031_init); | ||
445 | module_exit(pl031_exit); | ||
446 | 435 | ||
447 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net"); | 436 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net"); |
448 | MODULE_DESCRIPTION("ARM AMBA PL031 RTC Driver"); | 437 | MODULE_DESCRIPTION("ARM AMBA PL031 RTC Driver"); |
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index eef1524ae52e..3ff9e47bd218 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c | |||
@@ -370,17 +370,7 @@ static struct amba_driver sp805_wdt_driver = { | |||
370 | .remove = __devexit_p(sp805_wdt_remove), | 370 | .remove = __devexit_p(sp805_wdt_remove), |
371 | }; | 371 | }; |
372 | 372 | ||
373 | static int __init sp805_wdt_init(void) | 373 | module_amba_driver(sp805_wdt_driver); |
374 | { | ||
375 | return amba_driver_register(&sp805_wdt_driver); | ||
376 | } | ||
377 | module_init(sp805_wdt_init); | ||
378 | |||
379 | static void __exit sp805_wdt_exit(void) | ||
380 | { | ||
381 | amba_driver_unregister(&sp805_wdt_driver); | ||
382 | } | ||
383 | module_exit(sp805_wdt_exit); | ||
384 | 374 | ||
385 | module_param(nowayout, int, 0); | 375 | module_param(nowayout, int, 0); |
386 | MODULE_PARM_DESC(nowayout, | 376 | MODULE_PARM_DESC(nowayout, |
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h index a9fab831caf8..7847e197730a 100644 --- a/include/linux/amba/bus.h +++ b/include/linux/amba/bus.h | |||
@@ -125,4 +125,13 @@ struct amba_device name##_device = { \ | |||
125 | .periphid = id, \ | 125 | .periphid = id, \ |
126 | } | 126 | } |
127 | 127 | ||
128 | /* | ||
129 | * module_amba_driver() - Helper macro for drivers that don't do anything | ||
130 | * special in module init/exit. This eliminates a lot of boilerplate. Each | ||
131 | * module may only use this macro once, and calling it replaces module_init() | ||
132 | * and module_exit() | ||
133 | */ | ||
134 | #define module_amba_driver(__amba_drv) \ | ||
135 | module_driver(__amba_drv, amba_driver_register, amba_driver_unregister) | ||
136 | |||
128 | #endif | 137 | #endif |
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index b37b702a3a6a..5119fdabcb98 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c | |||
@@ -1110,18 +1110,7 @@ static struct amba_driver aaci_driver = { | |||
1110 | .id_table = aaci_ids, | 1110 | .id_table = aaci_ids, |
1111 | }; | 1111 | }; |
1112 | 1112 | ||
1113 | static int __init aaci_init(void) | 1113 | module_amba_driver(aaci_driver); |
1114 | { | ||
1115 | return amba_driver_register(&aaci_driver); | ||
1116 | } | ||
1117 | |||
1118 | static void __exit aaci_exit(void) | ||
1119 | { | ||
1120 | amba_driver_unregister(&aaci_driver); | ||
1121 | } | ||
1122 | |||
1123 | module_init(aaci_init); | ||
1124 | module_exit(aaci_exit); | ||
1125 | 1114 | ||
1126 | MODULE_LICENSE("GPL"); | 1115 | MODULE_LICENSE("GPL"); |
1127 | MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver"); | 1116 | MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver"); |