diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-27 07:45:03 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:12:35 -0500 |
commit | f99640dee209df4730f35a28b02693affd571ad5 (patch) | |
tree | e09afc21f8fe3616af01bb23f5ae1b08b9290873 /drivers/mtd | |
parent | 1f9327fcffdac27e7b100b3a392291a7b94c97fd (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')
29 files changed, 30 insertions, 345 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 | ||
260 | static int __init bcm963xx_mtd_init(void) | 260 | module_platform_driver(bcm63xx_mtd_dev); |
261 | { | ||
262 | return platform_driver_register(&bcm63xx_mtd_dev); | ||
263 | } | ||
264 | |||
265 | static void __exit bcm963xx_mtd_exit(void) | ||
266 | { | ||
267 | platform_driver_unregister(&bcm63xx_mtd_dev); | ||
268 | } | ||
269 | |||
270 | module_init(bcm963xx_mtd_init); | ||
271 | module_exit(bcm963xx_mtd_exit); | ||
272 | 261 | ||
273 | MODULE_LICENSE("GPL"); | 262 | MODULE_LICENSE("GPL"); |
274 | MODULE_DESCRIPTION("Broadcom BCM63xx MTD driver for CFE and RedBoot"); | 263 | MODULE_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 | ||
193 | static int __init bfin_flash_init(void) | 193 | module_platform_driver(bfin_flash_driver); |
194 | { | ||
195 | return platform_driver_register(&bfin_flash_driver); | ||
196 | } | ||
197 | module_init(bfin_flash_init); | ||
198 | |||
199 | static void __exit bfin_flash_exit(void) | ||
200 | { | ||
201 | platform_driver_unregister(&bfin_flash_driver); | ||
202 | } | ||
203 | module_exit(bfin_flash_exit); | ||
204 | 194 | ||
205 | MODULE_LICENSE("GPL"); | 195 | MODULE_LICENSE("GPL"); |
206 | MODULE_DESCRIPTION("MTD map driver for Blackfins with flash/ethernet on same async bank"); | 196 | MODULE_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 | ||
282 | static int __init gpio_flash_init(void) | 282 | module_platform_driver(gpio_flash_driver); |
283 | { | ||
284 | return platform_driver_register(&gpio_flash_driver); | ||
285 | } | ||
286 | module_init(gpio_flash_init); | ||
287 | |||
288 | static void __exit gpio_flash_exit(void) | ||
289 | { | ||
290 | platform_driver_unregister(&gpio_flash_driver); | ||
291 | } | ||
292 | module_exit(gpio_flash_exit); | ||
293 | 283 | ||
294 | MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>"); | 284 | MODULE_AUTHOR("Mike Frysinger <vapier@gentoo.org>"); |
295 | MODULE_DESCRIPTION("MTD map driver for flashes addressed physically and with gpios"); | 285 | MODULE_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 | ||
249 | static int __init ixp2000_flash_init(void) | 249 | module_platform_driver(ixp2000_flash_driver); |
250 | { | ||
251 | return platform_driver_register(&ixp2000_flash_driver); | ||
252 | } | ||
253 | |||
254 | static void __exit ixp2000_flash_exit(void) | ||
255 | { | ||
256 | platform_driver_unregister(&ixp2000_flash_driver); | ||
257 | } | ||
258 | 250 | ||
259 | module_init(ixp2000_flash_init); | ||
260 | module_exit(ixp2000_flash_exit); | ||
261 | MODULE_LICENSE("GPL"); | 251 | MODULE_LICENSE("GPL"); |
262 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); | 252 | MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); |
263 | MODULE_ALIAS("platform:IXP2000-Flash"); | 253 | MODULE_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 | ||
273 | static int __init ixp4xx_flash_init(void) | 273 | module_platform_driver(ixp4xx_flash_driver); |
274 | { | ||
275 | return platform_driver_register(&ixp4xx_flash_driver); | ||
276 | } | ||
277 | |||
278 | static void __exit ixp4xx_flash_exit(void) | ||
279 | { | ||
280 | platform_driver_unregister(&ixp4xx_flash_driver); | ||
281 | } | ||
282 | |||
283 | |||
284 | module_init(ixp4xx_flash_init); | ||
285 | module_exit(ixp4xx_flash_exit); | ||
286 | 274 | ||
287 | MODULE_LICENSE("GPL"); | 275 | MODULE_LICENSE("GPL"); |
288 | MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems"); | 276 | MODULE_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 | ||
226 | static int __init latch_addr_flash_init(void) | 226 | module_platform_driver(latch_addr_flash_driver); |
227 | { | ||
228 | return platform_driver_register(&latch_addr_flash_driver); | ||
229 | } | ||
230 | module_init(latch_addr_flash_init); | ||
231 | |||
232 | static void __exit latch_addr_flash_exit(void) | ||
233 | { | ||
234 | platform_driver_unregister(&latch_addr_flash_driver); | ||
235 | } | ||
236 | module_exit(latch_addr_flash_exit); | ||
237 | 227 | ||
238 | MODULE_AUTHOR("David Griego <dgriego@mvista.com>"); | 228 | MODULE_AUTHOR("David Griego <dgriego@mvista.com>"); |
239 | MODULE_DESCRIPTION("MTD map driver for flashes addressed physically with upper " | 229 | MODULE_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 | ||
341 | static int __init of_flash_init(void) | 341 | module_platform_driver(of_flash_driver); |
342 | { | ||
343 | return platform_driver_register(&of_flash_driver); | ||
344 | } | ||
345 | |||
346 | static void __exit of_flash_exit(void) | ||
347 | { | ||
348 | platform_driver_unregister(&of_flash_driver); | ||
349 | } | ||
350 | |||
351 | module_init(of_flash_init); | ||
352 | module_exit(of_flash_exit); | ||
353 | 342 | ||
354 | MODULE_LICENSE("GPL"); | 343 | MODULE_LICENSE("GPL"); |
355 | MODULE_AUTHOR("Vitaly Wool <vwool@ru.mvista.com>"); | 344 | MODULE_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 | ||
145 | static int __init init_pxa2xx_flash(void) | 145 | module_platform_driver(pxa2xx_flash_driver); |
146 | { | ||
147 | return platform_driver_register(&pxa2xx_flash_driver); | ||
148 | } | ||
149 | |||
150 | static void __exit cleanup_pxa2xx_flash(void) | ||
151 | { | ||
152 | platform_driver_unregister(&pxa2xx_flash_driver); | ||
153 | } | ||
154 | |||
155 | module_init(init_pxa2xx_flash); | ||
156 | module_exit(cleanup_pxa2xx_flash); | ||
157 | 146 | ||
158 | MODULE_LICENSE("GPL"); | 147 | MODULE_LICENSE("GPL"); |
159 | MODULE_AUTHOR("Nicolas Pitre <nico@fluxnic.net>"); | 148 | MODULE_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 | ||
140 | static int __init rbtx4939_flash_init(void) | 140 | module_platform_driver(rbtx4939_flash_driver); |
141 | { | ||
142 | return platform_driver_register(&rbtx4939_flash_driver); | ||
143 | } | ||
144 | |||
145 | static void __exit rbtx4939_flash_exit(void) | ||
146 | { | ||
147 | platform_driver_unregister(&rbtx4939_flash_driver); | ||
148 | } | ||
149 | |||
150 | module_init(rbtx4939_flash_init); | ||
151 | module_exit(rbtx4939_flash_exit); | ||
152 | 141 | ||
153 | MODULE_LICENSE("GPL"); | 142 | MODULE_LICENSE("GPL"); |
154 | MODULE_DESCRIPTION("RBTX4939 MTD map driver"); | 143 | MODULE_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 | ||
397 | static int __init sa1100_mtd_init(void) | 397 | module_platform_driver(sa1100_mtd_driver); |
398 | { | ||
399 | return platform_driver_register(&sa1100_mtd_driver); | ||
400 | } | ||
401 | |||
402 | static void __exit sa1100_mtd_exit(void) | ||
403 | { | ||
404 | platform_driver_unregister(&sa1100_mtd_driver); | ||
405 | } | ||
406 | |||
407 | module_init(sa1100_mtd_init); | ||
408 | module_exit(sa1100_mtd_exit); | ||
409 | 398 | ||
410 | MODULE_AUTHOR("Nicolas Pitre"); | 399 | MODULE_AUTHOR("Nicolas Pitre"); |
411 | MODULE_DESCRIPTION("SA1100 CFI map driver"); | 400 | MODULE_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 | ||
161 | static int __init uflash_init(void) | 161 | module_platform_driver(uflash_driver); |
162 | { | ||
163 | return platform_driver_register(&uflash_driver); | ||
164 | } | ||
165 | |||
166 | static void __exit uflash_exit(void) | ||
167 | { | ||
168 | platform_driver_unregister(&uflash_driver); | ||
169 | } | ||
170 | |||
171 | module_init(uflash_init); | ||
172 | module_exit(uflash_exit); | ||
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index 9e6b498c9beb..3197e9764fcd 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c | |||
@@ -280,17 +280,7 @@ static struct platform_driver ams_delta_nand_driver = { | |||
280 | }, | 280 | }, |
281 | }; | 281 | }; |
282 | 282 | ||
283 | static int __init ams_delta_nand_init(void) | 283 | module_platform_driver(ams_delta_nand_driver); |
284 | { | ||
285 | return platform_driver_register(&ams_delta_nand_driver); | ||
286 | } | ||
287 | module_init(ams_delta_nand_init); | ||
288 | |||
289 | static void __exit ams_delta_nand_exit(void) | ||
290 | { | ||
291 | platform_driver_unregister(&ams_delta_nand_driver); | ||
292 | } | ||
293 | module_exit(ams_delta_nand_exit); | ||
294 | 284 | ||
295 | MODULE_LICENSE("GPL"); | 285 | MODULE_LICENSE("GPL"); |
296 | MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>"); | 286 | MODULE_AUTHOR("Jonathan McDowell <noodles@earth.li>"); |
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c index 46b58d672847..50387fd4009b 100644 --- a/drivers/mtd/nand/bcm_umi_nand.c +++ b/drivers/mtd/nand/bcm_umi_nand.c | |||
@@ -546,18 +546,7 @@ static struct platform_driver nand_driver = { | |||
546 | .resume = bcm_umi_nand_resume, | 546 | .resume = bcm_umi_nand_resume, |
547 | }; | 547 | }; |
548 | 548 | ||
549 | static int __init nand_init(void) | 549 | module_platform_driver(nand_driver); |
550 | { | ||
551 | return platform_driver_register(&nand_driver); | ||
552 | } | ||
553 | |||
554 | static void __exit nand_exit(void) | ||
555 | { | ||
556 | platform_driver_unregister(&nand_driver); | ||
557 | } | ||
558 | |||
559 | module_init(nand_init); | ||
560 | module_exit(nand_exit); | ||
561 | 550 | ||
562 | MODULE_LICENSE("GPL"); | 551 | MODULE_LICENSE("GPL"); |
563 | MODULE_AUTHOR("Broadcom"); | 552 | MODULE_AUTHOR("Broadcom"); |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index eedd8ee2c9ac..f2f6e874d4de 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
@@ -971,18 +971,7 @@ static struct platform_driver fsl_elbc_nand_driver = { | |||
971 | .remove = fsl_elbc_nand_remove, | 971 | .remove = fsl_elbc_nand_remove, |
972 | }; | 972 | }; |
973 | 973 | ||
974 | static int __init fsl_elbc_nand_init(void) | 974 | module_platform_driver(fsl_elbc_nand_driver); |
975 | { | ||
976 | return platform_driver_register(&fsl_elbc_nand_driver); | ||
977 | } | ||
978 | |||
979 | static void __exit fsl_elbc_nand_exit(void) | ||
980 | { | ||
981 | platform_driver_unregister(&fsl_elbc_nand_driver); | ||
982 | } | ||
983 | |||
984 | module_init(fsl_elbc_nand_init); | ||
985 | module_exit(fsl_elbc_nand_exit); | ||
986 | 975 | ||
987 | MODULE_LICENSE("GPL"); | 976 | MODULE_LICENSE("GPL"); |
988 | MODULE_AUTHOR("Freescale"); | 977 | MODULE_AUTHOR("Freescale"); |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index b4f3cc9f32fb..45df542b9c61 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
@@ -353,17 +353,7 @@ static struct platform_driver of_fun_driver = { | |||
353 | .remove = __devexit_p(fun_remove), | 353 | .remove = __devexit_p(fun_remove), |
354 | }; | 354 | }; |
355 | 355 | ||
356 | static int __init fun_module_init(void) | 356 | module_platform_driver(of_fun_driver); |
357 | { | ||
358 | return platform_driver_register(&of_fun_driver); | ||
359 | } | ||
360 | module_init(fun_module_init); | ||
361 | |||
362 | static void __exit fun_module_exit(void) | ||
363 | { | ||
364 | platform_driver_unregister(&of_fun_driver); | ||
365 | } | ||
366 | module_exit(fun_module_exit); | ||
367 | 357 | ||
368 | MODULE_LICENSE("GPL"); | 358 | MODULE_LICENSE("GPL"); |
369 | MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>"); | 359 | MODULE_AUTHOR("Anton Vorontsov <avorontsov@ru.mvista.com>"); |
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c index e2664073a89b..ac3b9f255e00 100644 --- a/drivers/mtd/nand/jz4740_nand.c +++ b/drivers/mtd/nand/jz4740_nand.c | |||
@@ -423,17 +423,7 @@ static struct platform_driver jz_nand_driver = { | |||
423 | }, | 423 | }, |
424 | }; | 424 | }; |
425 | 425 | ||
426 | static int __init jz_nand_init(void) | 426 | module_platform_driver(jz_nand_driver); |
427 | { | ||
428 | return platform_driver_register(&jz_nand_driver); | ||
429 | } | ||
430 | module_init(jz_nand_init); | ||
431 | |||
432 | static void __exit jz_nand_exit(void) | ||
433 | { | ||
434 | platform_driver_unregister(&jz_nand_driver); | ||
435 | } | ||
436 | module_exit(jz_nand_exit); | ||
437 | 427 | ||
438 | MODULE_LICENSE("GPL"); | 428 | MODULE_LICENSE("GPL"); |
439 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | 429 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); |
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 5ede64706346..c240cf1af961 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
@@ -879,19 +879,7 @@ static struct platform_driver mpc5121_nfc_driver = { | |||
879 | }, | 879 | }, |
880 | }; | 880 | }; |
881 | 881 | ||
882 | static int __init mpc5121_nfc_init(void) | 882 | module_platform_driver(mpc5121_nfc_driver); |
883 | { | ||
884 | return platform_driver_register(&mpc5121_nfc_driver); | ||
885 | } | ||
886 | |||
887 | module_init(mpc5121_nfc_init); | ||
888 | |||
889 | static void __exit mpc5121_nfc_cleanup(void) | ||
890 | { | ||
891 | platform_driver_unregister(&mpc5121_nfc_driver); | ||
892 | } | ||
893 | |||
894 | module_exit(mpc5121_nfc_cleanup); | ||
895 | 883 | ||
896 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | 884 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); |
897 | MODULE_DESCRIPTION("MPC5121 NAND MTD driver"); | 885 | MODULE_DESCRIPTION("MPC5121 NAND MTD driver"); |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index f8aacf48ecdd..ec688548c880 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
@@ -294,18 +294,7 @@ static struct platform_driver ndfc_driver = { | |||
294 | .remove = __devexit_p(ndfc_remove), | 294 | .remove = __devexit_p(ndfc_remove), |
295 | }; | 295 | }; |
296 | 296 | ||
297 | static int __init ndfc_nand_init(void) | 297 | module_platform_driver(ndfc_driver); |
298 | { | ||
299 | return platform_driver_register(&ndfc_driver); | ||
300 | } | ||
301 | |||
302 | static void __exit ndfc_nand_exit(void) | ||
303 | { | ||
304 | platform_driver_unregister(&ndfc_driver); | ||
305 | } | ||
306 | |||
307 | module_init(ndfc_nand_init); | ||
308 | module_exit(ndfc_nand_exit); | ||
309 | 298 | ||
310 | MODULE_LICENSE("GPL"); | 299 | MODULE_LICENSE("GPL"); |
311 | MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>"); | 300 | MODULE_AUTHOR("Thomas Gleixner <tglx@linutronix.de>"); |
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c index b463ecfb4c1a..673dc6c68f9a 100644 --- a/drivers/mtd/nand/nomadik_nand.c +++ b/drivers/mtd/nand/nomadik_nand.c | |||
@@ -228,19 +228,7 @@ static struct platform_driver nomadik_nand_driver = { | |||
228 | }, | 228 | }, |
229 | }; | 229 | }; |
230 | 230 | ||
231 | static int __init nand_nomadik_init(void) | 231 | module_platform_driver(nomadik_nand_driver); |
232 | { | ||
233 | pr_info("Nomadik NAND driver\n"); | ||
234 | return platform_driver_register(&nomadik_nand_driver); | ||
235 | } | ||
236 | |||
237 | static void __exit nand_nomadik_exit(void) | ||
238 | { | ||
239 | platform_driver_unregister(&nomadik_nand_driver); | ||
240 | } | ||
241 | |||
242 | module_init(nand_nomadik_init); | ||
243 | module_exit(nand_nomadik_exit); | ||
244 | 232 | ||
245 | MODULE_LICENSE("GPL"); | 233 | MODULE_LICENSE("GPL"); |
246 | MODULE_AUTHOR("ST Microelectronics (sachin.verma@st.com)"); | 234 | MODULE_AUTHOR("ST Microelectronics (sachin.verma@st.com)"); |
diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c index fa8faedfad6e..8febe46e1105 100644 --- a/drivers/mtd/nand/nuc900_nand.c +++ b/drivers/mtd/nand/nuc900_nand.c | |||
@@ -364,18 +364,7 @@ static struct platform_driver nuc900_nand_driver = { | |||
364 | }, | 364 | }, |
365 | }; | 365 | }; |
366 | 366 | ||
367 | static int __init nuc900_nand_init(void) | 367 | module_platform_driver(nuc900_nand_driver); |
368 | { | ||
369 | return platform_driver_register(&nuc900_nand_driver); | ||
370 | } | ||
371 | |||
372 | static void __exit nuc900_nand_exit(void) | ||
373 | { | ||
374 | platform_driver_unregister(&nuc900_nand_driver); | ||
375 | } | ||
376 | |||
377 | module_init(nuc900_nand_init); | ||
378 | module_exit(nuc900_nand_exit); | ||
379 | 368 | ||
380 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); | 369 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); |
381 | MODULE_DESCRIPTION("w90p910/NUC9xx nand driver!"); | 370 | MODULE_DESCRIPTION("w90p910/NUC9xx nand driver!"); |
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c index f745f00f3167..b3a883e2a22f 100644 --- a/drivers/mtd/nand/omap2.c +++ b/drivers/mtd/nand/omap2.c | |||
@@ -1145,20 +1145,7 @@ static struct platform_driver omap_nand_driver = { | |||
1145 | }, | 1145 | }, |
1146 | }; | 1146 | }; |
1147 | 1147 | ||
1148 | static int __init omap_nand_init(void) | 1148 | module_platform_driver(omap_nand_driver); |
1149 | { | ||
1150 | pr_info("%s driver initializing\n", DRIVER_NAME); | ||
1151 | |||
1152 | return platform_driver_register(&omap_nand_driver); | ||
1153 | } | ||
1154 | |||
1155 | static void __exit omap_nand_exit(void) | ||
1156 | { | ||
1157 | platform_driver_unregister(&omap_nand_driver); | ||
1158 | } | ||
1159 | |||
1160 | module_init(omap_nand_init); | ||
1161 | module_exit(omap_nand_exit); | ||
1162 | 1149 | ||
1163 | MODULE_ALIAS("platform:" DRIVER_NAME); | 1150 | MODULE_ALIAS("platform:" DRIVER_NAME); |
1164 | MODULE_LICENSE("GPL"); | 1151 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index a97264ececdb..974dbf8251c9 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
@@ -230,17 +230,7 @@ static struct platform_driver pasemi_nand_driver = | |||
230 | .remove = pasemi_nand_remove, | 230 | .remove = pasemi_nand_remove, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static int __init pasemi_nand_init(void) | 233 | module_platform_driver(pasemi_nand_driver); |
234 | { | ||
235 | return platform_driver_register(&pasemi_nand_driver); | ||
236 | } | ||
237 | module_init(pasemi_nand_init); | ||
238 | |||
239 | static void __exit pasemi_nand_exit(void) | ||
240 | { | ||
241 | platform_driver_unregister(&pasemi_nand_driver); | ||
242 | } | ||
243 | module_exit(pasemi_nand_exit); | ||
244 | 234 | ||
245 | MODULE_LICENSE("GPL"); | 235 | MODULE_LICENSE("GPL"); |
246 | MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>"); | 236 | MODULE_AUTHOR("Egor Martovetsky <egor@pasemi.com>"); |
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c index ea8e1234e0e2..7f2da6953357 100644 --- a/drivers/mtd/nand/plat_nand.c +++ b/drivers/mtd/nand/plat_nand.c | |||
@@ -148,18 +148,7 @@ static struct platform_driver plat_nand_driver = { | |||
148 | }, | 148 | }, |
149 | }; | 149 | }; |
150 | 150 | ||
151 | static int __init plat_nand_init(void) | 151 | module_platform_driver(plat_nand_driver); |
152 | { | ||
153 | return platform_driver_register(&plat_nand_driver); | ||
154 | } | ||
155 | |||
156 | static void __exit plat_nand_exit(void) | ||
157 | { | ||
158 | platform_driver_unregister(&plat_nand_driver); | ||
159 | } | ||
160 | |||
161 | module_init(plat_nand_init); | ||
162 | module_exit(plat_nand_exit); | ||
163 | 152 | ||
164 | MODULE_LICENSE("GPL"); | 153 | MODULE_LICENSE("GPL"); |
165 | MODULE_AUTHOR("Vitaly Wool"); | 154 | MODULE_AUTHOR("Vitaly Wool"); |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 9eb7f879969e..90d60169ae40 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1311,17 +1311,7 @@ static struct platform_driver pxa3xx_nand_driver = { | |||
1311 | .resume = pxa3xx_nand_resume, | 1311 | .resume = pxa3xx_nand_resume, |
1312 | }; | 1312 | }; |
1313 | 1313 | ||
1314 | static int __init pxa3xx_nand_init(void) | 1314 | module_platform_driver(pxa3xx_nand_driver); |
1315 | { | ||
1316 | return platform_driver_register(&pxa3xx_nand_driver); | ||
1317 | } | ||
1318 | module_init(pxa3xx_nand_init); | ||
1319 | |||
1320 | static void __exit pxa3xx_nand_exit(void) | ||
1321 | { | ||
1322 | platform_driver_unregister(&pxa3xx_nand_driver); | ||
1323 | } | ||
1324 | module_exit(pxa3xx_nand_exit); | ||
1325 | 1315 | ||
1326 | MODULE_LICENSE("GPL"); | 1316 | MODULE_LICENSE("GPL"); |
1327 | MODULE_DESCRIPTION("PXA3xx NAND controller driver"); | 1317 | MODULE_DESCRIPTION("PXA3xx NAND controller driver"); |
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c index 619d2a504788..b175c0fd8b93 100644 --- a/drivers/mtd/nand/sharpsl.c +++ b/drivers/mtd/nand/sharpsl.c | |||
@@ -230,17 +230,7 @@ static struct platform_driver sharpsl_nand_driver = { | |||
230 | .remove = __devexit_p(sharpsl_nand_remove), | 230 | .remove = __devexit_p(sharpsl_nand_remove), |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static int __init sharpsl_nand_init(void) | 233 | module_platform_driver(sharpsl_nand_driver); |
234 | { | ||
235 | return platform_driver_register(&sharpsl_nand_driver); | ||
236 | } | ||
237 | module_init(sharpsl_nand_init); | ||
238 | |||
239 | static void __exit sharpsl_nand_exit(void) | ||
240 | { | ||
241 | platform_driver_unregister(&sharpsl_nand_driver); | ||
242 | } | ||
243 | module_exit(sharpsl_nand_exit); | ||
244 | 234 | ||
245 | MODULE_LICENSE("GPL"); | 235 | MODULE_LICENSE("GPL"); |
246 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); | 236 | MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>"); |
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index 0fb24f9c2327..e02b08bcf0c0 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c | |||
@@ -273,18 +273,7 @@ static struct platform_driver socrates_nand_driver = { | |||
273 | .remove = __devexit_p(socrates_nand_remove), | 273 | .remove = __devexit_p(socrates_nand_remove), |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static int __init socrates_nand_init(void) | 276 | module_platform_driver(socrates_nand_driver); |
277 | { | ||
278 | return platform_driver_register(&socrates_nand_driver); | ||
279 | } | ||
280 | |||
281 | static void __exit socrates_nand_exit(void) | ||
282 | { | ||
283 | platform_driver_unregister(&socrates_nand_driver); | ||
284 | } | ||
285 | |||
286 | module_init(socrates_nand_init); | ||
287 | module_exit(socrates_nand_exit); | ||
288 | 277 | ||
289 | MODULE_LICENSE("GPL"); | 278 | MODULE_LICENSE("GPL"); |
290 | MODULE_AUTHOR("Ilya Yanok"); | 279 | MODULE_AUTHOR("Ilya Yanok"); |
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c index beebd95f7690..6caa0cd9d6a7 100644 --- a/drivers/mtd/nand/tmio_nand.c +++ b/drivers/mtd/nand/tmio_nand.c | |||
@@ -533,18 +533,7 @@ static struct platform_driver tmio_driver = { | |||
533 | .resume = tmio_resume, | 533 | .resume = tmio_resume, |
534 | }; | 534 | }; |
535 | 535 | ||
536 | static int __init tmio_init(void) | 536 | module_platform_driver(tmio_driver); |
537 | { | ||
538 | return platform_driver_register(&tmio_driver); | ||
539 | } | ||
540 | |||
541 | static void __exit tmio_exit(void) | ||
542 | { | ||
543 | platform_driver_unregister(&tmio_driver); | ||
544 | } | ||
545 | |||
546 | module_init(tmio_init); | ||
547 | module_exit(tmio_exit); | ||
548 | 537 | ||
549 | MODULE_LICENSE("GPL v2"); | 538 | MODULE_LICENSE("GPL v2"); |
550 | MODULE_AUTHOR("Ian Molton, Dirk Opfer, Chris Humbert, Dmitry Baryshkov"); | 539 | MODULE_AUTHOR("Ian Molton, Dirk Opfer, Chris Humbert, Dmitry Baryshkov"); |
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c index 7813095264a5..0ccd5bff2544 100644 --- a/drivers/mtd/onenand/generic.c +++ b/drivers/mtd/onenand/generic.c | |||
@@ -115,21 +115,9 @@ static struct platform_driver generic_onenand_driver = { | |||
115 | .remove = __devexit_p(generic_onenand_remove), | 115 | .remove = __devexit_p(generic_onenand_remove), |
116 | }; | 116 | }; |
117 | 117 | ||
118 | MODULE_ALIAS("platform:" DRIVER_NAME); | 118 | module_platform_driver(generic_onenand_driver); |
119 | |||
120 | static int __init generic_onenand_init(void) | ||
121 | { | ||
122 | return platform_driver_register(&generic_onenand_driver); | ||
123 | } | ||
124 | |||
125 | static void __exit generic_onenand_exit(void) | ||
126 | { | ||
127 | platform_driver_unregister(&generic_onenand_driver); | ||
128 | } | ||
129 | |||
130 | module_init(generic_onenand_init); | ||
131 | module_exit(generic_onenand_exit); | ||
132 | 119 | ||
133 | MODULE_LICENSE("GPL"); | 120 | MODULE_LICENSE("GPL"); |
134 | MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>"); | 121 | MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>"); |
135 | MODULE_DESCRIPTION("Glue layer for OneNAND flash on generic boards"); | 122 | MODULE_DESCRIPTION("Glue layer for OneNAND flash on generic boards"); |
123 | MODULE_ALIAS("platform:" DRIVER_NAME); | ||
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index 5474547eafc2..fa1ee43f735b 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c | |||
@@ -1133,18 +1133,7 @@ static struct platform_driver s3c_onenand_driver = { | |||
1133 | .remove = __devexit_p(s3c_onenand_remove), | 1133 | .remove = __devexit_p(s3c_onenand_remove), |
1134 | }; | 1134 | }; |
1135 | 1135 | ||
1136 | static int __init s3c_onenand_init(void) | 1136 | module_platform_driver(s3c_onenand_driver); |
1137 | { | ||
1138 | return platform_driver_register(&s3c_onenand_driver); | ||
1139 | } | ||
1140 | |||
1141 | static void __exit s3c_onenand_exit(void) | ||
1142 | { | ||
1143 | platform_driver_unregister(&s3c_onenand_driver); | ||
1144 | } | ||
1145 | |||
1146 | module_init(s3c_onenand_init); | ||
1147 | module_exit(s3c_onenand_exit); | ||
1148 | 1137 | ||
1149 | MODULE_LICENSE("GPL"); | 1138 | MODULE_LICENSE("GPL"); |
1150 | MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>"); | 1139 | MODULE_AUTHOR("Kyungmin Park <kyungmin.park@samsung.com>"); |