aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/char/hw_random/nomadik-rng.c13
-rw-r--r--drivers/dma/pl330.c13
-rw-r--r--drivers/input/serio/ambakmi.c13
-rw-r--r--drivers/mmc/host/mmci.c12
-rw-r--r--drivers/rtc/rtc-pl030.c13
-rw-r--r--drivers/rtc/rtc-pl031.c13
-rw-r--r--drivers/watchdog/sp805_wdt.c12
-rw-r--r--include/linux/amba/bus.h9
-rw-r--r--sound/arm/aaci.c13
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
110static int __init nmk_rng_init(void) 110module_amba_driver(nmk_rng_driver);
111{
112 return amba_driver_register(&nmk_rng_driver);
113}
114
115static void __devexit nmk_rng_exit(void)
116{
117 amba_driver_unregister(&nmk_rng_driver);
118}
119
120module_init(nmk_rng_init);
121module_exit(nmk_rng_exit);
122 111
123MODULE_LICENSE("GPL"); 112MODULE_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
1038static int __init pl330_init(void) 1038module_amba_driver(pl330_driver);
1039{
1040 return amba_driver_register(&pl330_driver);
1041}
1042module_init(pl330_init);
1043
1044static void __exit pl330_exit(void)
1045{
1046 amba_driver_unregister(&pl330_driver);
1047 return;
1048}
1049module_exit(pl330_exit);
1050 1039
1051MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>"); 1040MODULE_AUTHOR("Jaswinder Singh <jassi.brar@samsung.com>");
1052MODULE_DESCRIPTION("API Driver for PL330 DMAC"); 1041MODULE_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
211static int __init amba_kmi_init(void) 211module_amba_driver(ambakmi_driver);
212{
213 return amba_driver_register(&ambakmi_driver);
214}
215
216static void __exit amba_kmi_exit(void)
217{
218 amba_driver_unregister(&ambakmi_driver);
219}
220
221module_init(amba_kmi_init);
222module_exit(amba_kmi_exit);
223 212
224MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); 213MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
225MODULE_DESCRIPTION("AMBA KMI controller driver"); 214MODULE_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
1522static int __init mmci_init(void) 1522module_amba_driver(mmci_driver);
1523{
1524 return amba_driver_register(&mmci_driver);
1525}
1526
1527static void __exit mmci_exit(void)
1528{
1529 amba_driver_unregister(&mmci_driver);
1530}
1531 1523
1532module_init(mmci_init);
1533module_exit(mmci_exit);
1534module_param(fmax, uint, 0444); 1524module_param(fmax, uint, 0444);
1535 1525
1536MODULE_DESCRIPTION("ARM PrimeCell PL180/181 Multimedia Card Interface driver"); 1526MODULE_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
188static int __init pl030_init(void) 188module_amba_driver(pl030_driver);
189{
190 return amba_driver_register(&pl030_driver);
191}
192
193static void __exit pl030_exit(void)
194{
195 amba_driver_unregister(&pl030_driver);
196}
197
198module_init(pl030_init);
199module_exit(pl030_exit);
200 189
201MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); 190MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
202MODULE_DESCRIPTION("ARM AMBA PL030 RTC Driver"); 191MODULE_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
434static int __init pl031_init(void) 434module_amba_driver(pl031_driver);
435{
436 return amba_driver_register(&pl031_driver);
437}
438
439static void __exit pl031_exit(void)
440{
441 amba_driver_unregister(&pl031_driver);
442}
443
444module_init(pl031_init);
445module_exit(pl031_exit);
446 435
447MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net"); 436MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net");
448MODULE_DESCRIPTION("ARM AMBA PL031 RTC Driver"); 437MODULE_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
373static int __init sp805_wdt_init(void) 373module_amba_driver(sp805_wdt_driver);
374{
375 return amba_driver_register(&sp805_wdt_driver);
376}
377module_init(sp805_wdt_init);
378
379static void __exit sp805_wdt_exit(void)
380{
381 amba_driver_unregister(&sp805_wdt_driver);
382}
383module_exit(sp805_wdt_exit);
384 374
385module_param(nowayout, int, 0); 375module_param(nowayout, int, 0);
386MODULE_PARM_DESC(nowayout, 376MODULE_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
1113static int __init aaci_init(void) 1113module_amba_driver(aaci_driver);
1114{
1115 return amba_driver_register(&aaci_driver);
1116}
1117
1118static void __exit aaci_exit(void)
1119{
1120 amba_driver_unregister(&aaci_driver);
1121}
1122
1123module_init(aaci_init);
1124module_exit(aaci_exit);
1125 1114
1126MODULE_LICENSE("GPL"); 1115MODULE_LICENSE("GPL");
1127MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver"); 1116MODULE_DESCRIPTION("ARM PrimeCell PL041 Advanced Audio CODEC Interface driver");