aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-11-27 07:45:03 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-01-09 13:12:35 -0500
commitf99640dee209df4730f35a28b02693affd571ad5 (patch)
treee09afc21f8fe3616af01bb23f5ae1b08b9290873 /drivers/mtd/maps
parent1f9327fcffdac27e7b100b3a392291a7b94c97fd (diff)
mtd: convert drivers/mtd/* to use module_platform_driver()
This patch converts the drivers in drivers/mtd/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/bcm963xx-flash.c13
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c12
-rw-r--r--drivers/mtd/maps/gpio-addr-flash.c12
-rw-r--r--drivers/mtd/maps/ixp2000.c12
-rw-r--r--drivers/mtd/maps/ixp4xx.c14
-rw-r--r--drivers/mtd/maps/latch-addr-flash.c12
-rw-r--r--drivers/mtd/maps/physmap_of.c13
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c13
-rw-r--r--drivers/mtd/maps/rbtx4939-flash.c13
-rw-r--r--drivers/mtd/maps/sa1100-flash.c13
-rw-r--r--drivers/mtd/maps/sun_uflash.c13
11 files changed, 11 insertions, 129 deletions
diff --git a/drivers/mtd/maps/bcm963xx-flash.c b/drivers/mtd/maps/bcm963xx-flash.c
index 736ca10ca9f1..56927f5302c1 100644
--- a/drivers/mtd/maps/bcm963xx-flash.c
+++ b/drivers/mtd/maps/bcm963xx-flash.c
@@ -257,18 +257,7 @@ static struct platform_driver bcm63xx_mtd_dev = {
257 }, 257 },
258}; 258};
259 259
260static int __init bcm963xx_mtd_init(void) 260module_platform_driver(bcm63xx_mtd_dev);
261{
262 return platform_driver_register(&bcm63xx_mtd_dev);
263}
264
265static void __exit bcm963xx_mtd_exit(void)
266{
267 platform_driver_unregister(&bcm63xx_mtd_dev);
268}
269
270module_init(bcm963xx_mtd_init);
271module_exit(bcm963xx_mtd_exit);
272 261
273MODULE_LICENSE("GPL"); 262MODULE_LICENSE("GPL");
274MODULE_DESCRIPTION("Broadcom BCM63xx MTD driver for CFE and RedBoot"); 263MODULE_DESCRIPTION("Broadcom BCM63xx MTD driver for CFE and RedBoot");
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
index 6d6b2b5674ee..650126c361f1 100644
--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -190,17 +190,7 @@ static struct platform_driver bfin_flash_driver = {
190 }, 190 },
191}; 191};
192 192
193static int __init bfin_flash_init(void) 193module_platform_driver(bfin_flash_driver);
194{
195 return platform_driver_register(&bfin_flash_driver);
196}
197module_init(bfin_flash_init);
198
199static void __exit bfin_flash_exit(void)
200{
201 platform_driver_unregister(&bfin_flash_driver);
202}
203module_exit(bfin_flash_exit);
204 194
205MODULE_LICENSE("GPL"); 195MODULE_LICENSE("GPL");
206MODULE_DESCRIPTION("MTD map driver for Blackfins with flash/ethernet on same async bank"); 196MODULE_DESCRIPTION("MTD map driver for Blackfins with flash/ethernet on same async bank");
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
index 1ec66f031c51..33cce895859f 100644
--- a/drivers/mtd/maps/gpio-addr-flash.c
+++ b/drivers/mtd/maps/gpio-addr-flash.c
@@ -279,17 +279,7 @@ static struct platform_driver gpio_flash_driver = {
279 }, 279 },
280}; 280};
281 281
282static int __init gpio_flash_init(void) 282module_platform_driver(gpio_flash_driver);
283{
284 return platform_driver_register(&gpio_flash_driver);
285}
286module_init(gpio_flash_init);
287
288static void __exit gpio_flash_exit(void)
289{
290 platform_driver_unregister(&gpio_flash_driver);
291}
292module_exit(gpio_flash_exit);
293 283
294MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>"); 284MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>");
295MODULE_DESCRIPTION("MTD map driver for flashes addressed physically and with gpios"); 285MODULE_DESCRIPTION("MTD map driver for flashes addressed physically and with gpios");
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c
index 437fcd2f352f..fc7d4d0d9a4e 100644
--- a/drivers/mtd/maps/ixp2000.c
+++ b/drivers/mtd/maps/ixp2000.c
@@ -246,18 +246,8 @@ static struct platform_driver ixp2000_flash_driver = {
246 }, 246 },
247}; 247};
248 248
249static int __init ixp2000_flash_init(void) 249module_platform_driver(ixp2000_flash_driver);
250{
251 return platform_driver_register(&ixp2000_flash_driver);
252}
253
254static void __exit ixp2000_flash_exit(void)
255{
256 platform_driver_unregister(&ixp2000_flash_driver);
257}
258 250
259module_init(ixp2000_flash_init);
260module_exit(ixp2000_flash_exit);
261MODULE_LICENSE("GPL"); 251MODULE_LICENSE("GPL");
262MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); 252MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
263MODULE_ALIAS("platform:IXP2000-Flash"); 253MODULE_ALIAS("platform:IXP2000-Flash");
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
index 30409015a3de..8b5410162d70 100644
--- a/drivers/mtd/maps/ixp4xx.c
+++ b/drivers/mtd/maps/ixp4xx.c
@@ -270,19 +270,7 @@ static struct platform_driver ixp4xx_flash_driver = {
270 }, 270 },
271}; 271};
272 272
273static int __init ixp4xx_flash_init(void) 273module_platform_driver(ixp4xx_flash_driver);
274{
275 return platform_driver_register(&ixp4xx_flash_driver);
276}
277
278static void __exit ixp4xx_flash_exit(void)
279{
280 platform_driver_unregister(&ixp4xx_flash_driver);
281}
282
283
284module_init(ixp4xx_flash_init);
285module_exit(ixp4xx_flash_exit);
286 274
287MODULE_LICENSE("GPL"); 275MODULE_LICENSE("GPL");
288MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems"); 276MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems");
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
index 119baa7d7477..8fed58e3a4a8 100644
--- a/drivers/mtd/maps/latch-addr-flash.c
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -223,17 +223,7 @@ static struct platform_driver latch_addr_flash_driver = {
223 }, 223 },
224}; 224};
225 225
226static int __init latch_addr_flash_init(void) 226module_platform_driver(latch_addr_flash_driver);
227{
228 return platform_driver_register(&latch_addr_flash_driver);
229}
230module_init(latch_addr_flash_init);
231
232static void __exit latch_addr_flash_exit(void)
233{
234 platform_driver_unregister(&latch_addr_flash_driver);
235}
236module_exit(latch_addr_flash_exit);
237 227
238MODULE_AUTHOR("David Griego <dgriego@mvista.com>"); 228MODULE_AUTHOR("David Griego <dgriego@mvista.com>");
239MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper " 229MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper "
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 7d65f9d3e690..2e6fb6831d55 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -338,18 +338,7 @@ static struct platform_driver of_flash_driver = {
338 .remove = of_flash_remove, 338 .remove = of_flash_remove,
339}; 339};
340 340
341static int __init of_flash_init(void) 341module_platform_driver(of_flash_driver);
342{
343 return platform_driver_register(&of_flash_driver);
344}
345
346static void __exit of_flash_exit(void)
347{
348 platform_driver_unregister(&of_flash_driver);
349}
350
351module_init(of_flash_init);
352module_exit(of_flash_exit);
353 342
354MODULE_LICENSE("GPL"); 343MODULE_LICENSE("GPL");
355MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>"); 344MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>");
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index 2a25b6789af4..274e39914332 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -142,18 +142,7 @@ static struct platform_driver pxa2xx_flash_driver = {
142 .shutdown = pxa2xx_flash_shutdown, 142 .shutdown = pxa2xx_flash_shutdown,
143}; 143};
144 144
145static int __init init_pxa2xx_flash(void) 145module_platform_driver(pxa2xx_flash_driver);
146{
147 return platform_driver_register(&pxa2xx_flash_driver);
148}
149
150static void __exit cleanup_pxa2xx_flash(void)
151{
152 platform_driver_unregister(&pxa2xx_flash_driver);
153}
154
155module_init(init_pxa2xx_flash);
156module_exit(cleanup_pxa2xx_flash);
157 146
158MODULE_LICENSE("GPL"); 147MODULE_LICENSE("GPL");
159MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net>"); 148MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net>");
diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c
index 0237f197fd12..bb7d2042affa 100644
--- a/drivers/mtd/maps/rbtx4939-flash.c
+++ b/drivers/mtd/maps/rbtx4939-flash.c
@@ -137,18 +137,7 @@ static struct platform_driver rbtx4939_flash_driver = {
137 }, 137 },
138}; 138};
139 139
140static int __init rbtx4939_flash_init(void) 140module_platform_driver(rbtx4939_flash_driver);
141{
142 return platform_driver_register(&rbtx4939_flash_driver);
143}
144
145static void __exit rbtx4939_flash_exit(void)
146{
147 platform_driver_unregister(&rbtx4939_flash_driver);
148}
149
150module_init(rbtx4939_flash_init);
151module_exit(rbtx4939_flash_exit);
152 141
153MODULE_LICENSE("GPL"); 142MODULE_LICENSE("GPL");
154MODULE_DESCRIPTION("RBTX4939 MTD map driver"); 143MODULE_DESCRIPTION("RBTX4939 MTD map driver");
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index fa9c0a9670cd..ac3a290748cd 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -394,18 +394,7 @@ static struct platform_driver sa1100_mtd_driver = {
394 }, 394 },
395}; 395};
396 396
397static int __init sa1100_mtd_init(void) 397module_platform_driver(sa1100_mtd_driver);
398{
399 return platform_driver_register(&sa1100_mtd_driver);
400}
401
402static void __exit sa1100_mtd_exit(void)
403{
404 platform_driver_unregister(&sa1100_mtd_driver);
405}
406
407module_init(sa1100_mtd_init);
408module_exit(sa1100_mtd_exit);
409 398
410MODULE_AUTHOR("Nicolas Pitre"); 399MODULE_AUTHOR("Nicolas Pitre");
411MODULE_DESCRIPTION("SA1100 CFI map driver"); 400MODULE_DESCRIPTION("SA1100 CFI map driver");
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 2d66234f57cb..175e537b444f 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -158,15 +158,4 @@ static struct platform_driver uflash_driver = {
158 .remove = __devexit_p(uflash_remove), 158 .remove = __devexit_p(uflash_remove),
159}; 159};
160 160
161static int __init uflash_init(void) 161module_platform_driver(uflash_driver);
162{
163 return platform_driver_register(&uflash_driver);
164}
165
166static void __exit uflash_exit(void)
167{
168 platform_driver_unregister(&uflash_driver);
169}
170
171module_init(uflash_init);
172module_exit(uflash_exit);