diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 13:29:49 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-24 18:35:47 -0400 |
commit | 940ab88962bc1aff3273a8356d64577a6e386736 (patch) | |
tree | 3d96d0cb30fd3c6e1b17b2a2d264f4d44258a3bb /drivers/spi | |
parent | 38ada214fad79ff5ebbed58932c5f0c9969d9c91 (diff) |
drivercore: Add helper macro for platform_driver boilerplate
For simple modules that contain a single platform_driver without any
additional setup code then ends up being a block of duplicated
boilerplate. This patch adds a new macro, module_platform_driver(),
which replaces the module_init()/module_exit() registrations with
template functions.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Reviewed-by: Magnus Damm <magnus.damm@gmail.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-altera.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-ath79.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-atmel.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-bfin-sport.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-coldfire-qspi.c | 14 | ||||
-rw-r--r-- | drivers/spi/spi-davinci.c | 20 | ||||
-rw-r--r-- | drivers/spi/spi-dw-mmio.c | 14 | ||||
-rw-r--r-- | drivers/spi/spi-ep93xx.c | 20 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-espi.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-gpio.c | 21 | ||||
-rw-r--r-- | drivers/spi/spi-imx.c | 14 | ||||
-rw-r--r-- | drivers/spi/spi-mpc512x-psc.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx-psc.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx.c | 14 | ||||
-rw-r--r-- | drivers/spi/spi-nuc900.c | 14 | ||||
-rw-r--r-- | drivers/spi/spi-oc-tiny.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-ppc4xx.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-s3c24xx.c | 21 | ||||
-rw-r--r-- | drivers/spi/spi-sh-msiof.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-sh-sci.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-sh.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-stmp.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-tegra.c | 16 | ||||
-rw-r--r-- | drivers/spi/spi-ti-ssp.c | 13 | ||||
-rw-r--r-- | drivers/spi/spi-xilinx.c | 13 |
25 files changed, 45 insertions, 318 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index 4813a63ce6fb..881c1967741d 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c | |||
@@ -320,18 +320,7 @@ static struct platform_driver altera_spi_driver = { | |||
320 | .of_match_table = altera_spi_match, | 320 | .of_match_table = altera_spi_match, |
321 | }, | 321 | }, |
322 | }; | 322 | }; |
323 | 323 | module_platform_driver(altera_spi_driver); | |
324 | static int __init altera_spi_init(void) | ||
325 | { | ||
326 | return platform_driver_register(&altera_spi_driver); | ||
327 | } | ||
328 | module_init(altera_spi_init); | ||
329 | |||
330 | static void __exit altera_spi_exit(void) | ||
331 | { | ||
332 | platform_driver_unregister(&altera_spi_driver); | ||
333 | } | ||
334 | module_exit(altera_spi_exit); | ||
335 | 324 | ||
336 | MODULE_DESCRIPTION("Altera SPI driver"); | 325 | MODULE_DESCRIPTION("Altera SPI driver"); |
337 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); | 326 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); |
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index 03019bf5a5e9..024b48aed5ca 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c | |||
@@ -273,18 +273,7 @@ static struct platform_driver ath79_spi_driver = { | |||
273 | .owner = THIS_MODULE, | 273 | .owner = THIS_MODULE, |
274 | }, | 274 | }, |
275 | }; | 275 | }; |
276 | 276 | module_platform_driver(ath79_spi_driver); | |
277 | static __init int ath79_spi_init(void) | ||
278 | { | ||
279 | return platform_driver_register(&ath79_spi_driver); | ||
280 | } | ||
281 | module_init(ath79_spi_init); | ||
282 | |||
283 | static __exit void ath79_spi_exit(void) | ||
284 | { | ||
285 | platform_driver_unregister(&ath79_spi_driver); | ||
286 | } | ||
287 | module_exit(ath79_spi_exit); | ||
288 | 277 | ||
289 | MODULE_DESCRIPTION("SPI controller driver for Atheros AR71XX/AR724X/AR913X"); | 278 | MODULE_DESCRIPTION("SPI controller driver for Atheros AR71XX/AR724X/AR913X"); |
290 | MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>"); | 279 | MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>"); |
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 82dee9a6c0de..a356392ab2f6 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -1074,18 +1074,7 @@ static struct platform_driver atmel_spi_driver = { | |||
1074 | .resume = atmel_spi_resume, | 1074 | .resume = atmel_spi_resume, |
1075 | .remove = __exit_p(atmel_spi_remove), | 1075 | .remove = __exit_p(atmel_spi_remove), |
1076 | }; | 1076 | }; |
1077 | 1077 | module_platform_driver(atmel_spi_driver); | |
1078 | static int __init atmel_spi_init(void) | ||
1079 | { | ||
1080 | return platform_driver_probe(&atmel_spi_driver, atmel_spi_probe); | ||
1081 | } | ||
1082 | module_init(atmel_spi_init); | ||
1083 | |||
1084 | static void __exit atmel_spi_exit(void) | ||
1085 | { | ||
1086 | platform_driver_unregister(&atmel_spi_driver); | ||
1087 | } | ||
1088 | module_exit(atmel_spi_exit); | ||
1089 | 1078 | ||
1090 | MODULE_DESCRIPTION("Atmel AT32/AT91 SPI Controller driver"); | 1079 | MODULE_DESCRIPTION("Atmel AT32/AT91 SPI Controller driver"); |
1091 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); | 1080 | MODULE_AUTHOR("Haavard Skinnemoen (Atmel)"); |
diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c index e557ff617b11..248a2cc671a9 100644 --- a/drivers/spi/spi-bfin-sport.c +++ b/drivers/spi/spi-bfin-sport.c | |||
@@ -938,15 +938,4 @@ static struct platform_driver bfin_sport_spi_driver = { | |||
938 | .suspend = bfin_sport_spi_suspend, | 938 | .suspend = bfin_sport_spi_suspend, |
939 | .resume = bfin_sport_spi_resume, | 939 | .resume = bfin_sport_spi_resume, |
940 | }; | 940 | }; |
941 | 941 | module_platform_driver(bfin_sport_spi_driver); | |
942 | static int __init bfin_sport_spi_init(void) | ||
943 | { | ||
944 | return platform_driver_register(&bfin_sport_spi_driver); | ||
945 | } | ||
946 | module_init(bfin_sport_spi_init); | ||
947 | |||
948 | static void __exit bfin_sport_spi_exit(void) | ||
949 | { | ||
950 | platform_driver_unregister(&bfin_sport_spi_driver); | ||
951 | } | ||
952 | module_exit(bfin_sport_spi_exit); | ||
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 7397c4d57007..6eee64a5d240 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c | |||
@@ -621,20 +621,10 @@ static struct platform_driver mcfqspi_driver = { | |||
621 | .driver.name = DRIVER_NAME, | 621 | .driver.name = DRIVER_NAME, |
622 | .driver.owner = THIS_MODULE, | 622 | .driver.owner = THIS_MODULE, |
623 | .driver.pm = MCFQSPI_DEV_PM_OPS, | 623 | .driver.pm = MCFQSPI_DEV_PM_OPS, |
624 | .probe = mcfqspi_probe, | ||
624 | .remove = __devexit_p(mcfqspi_remove), | 625 | .remove = __devexit_p(mcfqspi_remove), |
625 | }; | 626 | }; |
626 | 627 | module_platform_driver(mcfqspi_driver); | |
627 | static int __init mcfqspi_init(void) | ||
628 | { | ||
629 | return platform_driver_probe(&mcfqspi_driver, mcfqspi_probe); | ||
630 | } | ||
631 | module_init(mcfqspi_init); | ||
632 | |||
633 | static void __exit mcfqspi_exit(void) | ||
634 | { | ||
635 | platform_driver_unregister(&mcfqspi_driver); | ||
636 | } | ||
637 | module_exit(mcfqspi_exit); | ||
638 | 628 | ||
639 | MODULE_AUTHOR("Steven King <sfking@fdwdc.com>"); | 629 | MODULE_AUTHOR("Steven King <sfking@fdwdc.com>"); |
640 | MODULE_DESCRIPTION("Coldfire QSPI Controller Driver"); | 630 | MODULE_DESCRIPTION("Coldfire QSPI Controller Driver"); |
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 1f0ed8005c91..31bfba805cf4 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -799,7 +799,7 @@ rx_dma_failed: | |||
799 | * It will invoke spi_bitbang_start to create work queue so that client driver | 799 | * It will invoke spi_bitbang_start to create work queue so that client driver |
800 | * can register transfer method to work queue. | 800 | * can register transfer method to work queue. |
801 | */ | 801 | */ |
802 | static int davinci_spi_probe(struct platform_device *pdev) | 802 | static int __devinit davinci_spi_probe(struct platform_device *pdev) |
803 | { | 803 | { |
804 | struct spi_master *master; | 804 | struct spi_master *master; |
805 | struct davinci_spi *dspi; | 805 | struct davinci_spi *dspi; |
@@ -984,7 +984,7 @@ err: | |||
984 | * It will also call spi_bitbang_stop to destroy the work queue which was | 984 | * It will also call spi_bitbang_stop to destroy the work queue which was |
985 | * created by spi_bitbang_start. | 985 | * created by spi_bitbang_start. |
986 | */ | 986 | */ |
987 | static int __exit davinci_spi_remove(struct platform_device *pdev) | 987 | static int __devexit davinci_spi_remove(struct platform_device *pdev) |
988 | { | 988 | { |
989 | struct davinci_spi *dspi; | 989 | struct davinci_spi *dspi; |
990 | struct spi_master *master; | 990 | struct spi_master *master; |
@@ -1011,20 +1011,10 @@ static struct platform_driver davinci_spi_driver = { | |||
1011 | .name = "spi_davinci", | 1011 | .name = "spi_davinci", |
1012 | .owner = THIS_MODULE, | 1012 | .owner = THIS_MODULE, |
1013 | }, | 1013 | }, |
1014 | .remove = __exit_p(davinci_spi_remove), | 1014 | .probe = davinci_spi_probe, |
1015 | .remove = __devexit_p(davinci_spi_remove), | ||
1015 | }; | 1016 | }; |
1016 | 1017 | module_platform_driver(davinci_spi_driver); | |
1017 | static int __init davinci_spi_init(void) | ||
1018 | { | ||
1019 | return platform_driver_probe(&davinci_spi_driver, davinci_spi_probe); | ||
1020 | } | ||
1021 | module_init(davinci_spi_init); | ||
1022 | |||
1023 | static void __exit davinci_spi_exit(void) | ||
1024 | { | ||
1025 | platform_driver_unregister(&davinci_spi_driver); | ||
1026 | } | ||
1027 | module_exit(davinci_spi_exit); | ||
1028 | 1018 | ||
1029 | MODULE_DESCRIPTION("TI DaVinci SPI Master Controller Driver"); | 1019 | MODULE_DESCRIPTION("TI DaVinci SPI Master Controller Driver"); |
1030 | MODULE_LICENSE("GPL"); | 1020 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c index 34eb66501dbf..fac399c3022c 100644 --- a/drivers/spi/spi-dw-mmio.c +++ b/drivers/spi/spi-dw-mmio.c | |||
@@ -127,24 +127,14 @@ static int __devexit dw_spi_mmio_remove(struct platform_device *pdev) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | static struct platform_driver dw_spi_mmio_driver = { | 129 | static struct platform_driver dw_spi_mmio_driver = { |
130 | .probe = dw_spi_mmio_probe, | ||
130 | .remove = __devexit_p(dw_spi_mmio_remove), | 131 | .remove = __devexit_p(dw_spi_mmio_remove), |
131 | .driver = { | 132 | .driver = { |
132 | .name = DRIVER_NAME, | 133 | .name = DRIVER_NAME, |
133 | .owner = THIS_MODULE, | 134 | .owner = THIS_MODULE, |
134 | }, | 135 | }, |
135 | }; | 136 | }; |
136 | 137 | module_platform_driver(dw_spi_mmio_driver); | |
137 | static int __init dw_spi_mmio_init(void) | ||
138 | { | ||
139 | return platform_driver_probe(&dw_spi_mmio_driver, dw_spi_mmio_probe); | ||
140 | } | ||
141 | module_init(dw_spi_mmio_init); | ||
142 | |||
143 | static void __exit dw_spi_mmio_exit(void) | ||
144 | { | ||
145 | platform_driver_unregister(&dw_spi_mmio_driver); | ||
146 | } | ||
147 | module_exit(dw_spi_mmio_exit); | ||
148 | 138 | ||
149 | MODULE_AUTHOR("Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>"); | 139 | MODULE_AUTHOR("Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com>"); |
150 | MODULE_DESCRIPTION("Memory-mapped I/O interface driver for DW SPI Core"); | 140 | MODULE_DESCRIPTION("Memory-mapped I/O interface driver for DW SPI Core"); |
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index 11515c5531df..0a282e5fcc9c 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -1026,7 +1026,7 @@ static void ep93xx_spi_release_dma(struct ep93xx_spi *espi) | |||
1026 | free_page((unsigned long)espi->zeropage); | 1026 | free_page((unsigned long)espi->zeropage); |
1027 | } | 1027 | } |
1028 | 1028 | ||
1029 | static int __init ep93xx_spi_probe(struct platform_device *pdev) | 1029 | static int __devinit ep93xx_spi_probe(struct platform_device *pdev) |
1030 | { | 1030 | { |
1031 | struct spi_master *master; | 1031 | struct spi_master *master; |
1032 | struct ep93xx_spi_info *info; | 1032 | struct ep93xx_spi_info *info; |
@@ -1151,7 +1151,7 @@ fail_release_master: | |||
1151 | return error; | 1151 | return error; |
1152 | } | 1152 | } |
1153 | 1153 | ||
1154 | static int __exit ep93xx_spi_remove(struct platform_device *pdev) | 1154 | static int __devexit ep93xx_spi_remove(struct platform_device *pdev) |
1155 | { | 1155 | { |
1156 | struct spi_master *master = platform_get_drvdata(pdev); | 1156 | struct spi_master *master = platform_get_drvdata(pdev); |
1157 | struct ep93xx_spi *espi = spi_master_get_devdata(master); | 1157 | struct ep93xx_spi *espi = spi_master_get_devdata(master); |
@@ -1197,20 +1197,10 @@ static struct platform_driver ep93xx_spi_driver = { | |||
1197 | .name = "ep93xx-spi", | 1197 | .name = "ep93xx-spi", |
1198 | .owner = THIS_MODULE, | 1198 | .owner = THIS_MODULE, |
1199 | }, | 1199 | }, |
1200 | .remove = __exit_p(ep93xx_spi_remove), | 1200 | .probe = ep93xx_spi_probe, |
1201 | .remove = __devexit_p(ep93xx_spi_remove), | ||
1201 | }; | 1202 | }; |
1202 | 1203 | module_platform_driver(ep93xx_spi_driver); | |
1203 | static int __init ep93xx_spi_init(void) | ||
1204 | { | ||
1205 | return platform_driver_probe(&ep93xx_spi_driver, ep93xx_spi_probe); | ||
1206 | } | ||
1207 | module_init(ep93xx_spi_init); | ||
1208 | |||
1209 | static void __exit ep93xx_spi_exit(void) | ||
1210 | { | ||
1211 | platform_driver_unregister(&ep93xx_spi_driver); | ||
1212 | } | ||
1213 | module_exit(ep93xx_spi_exit); | ||
1214 | 1204 | ||
1215 | MODULE_DESCRIPTION("EP93xx SPI Controller driver"); | 1205 | MODULE_DESCRIPTION("EP93xx SPI Controller driver"); |
1216 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); | 1206 | MODULE_AUTHOR("Mika Westerberg <mika.westerberg@iki.fi>"); |
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 54e499d5f92c..d770f03705c3 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
@@ -744,18 +744,7 @@ static struct platform_driver fsl_espi_driver = { | |||
744 | .probe = of_fsl_espi_probe, | 744 | .probe = of_fsl_espi_probe, |
745 | .remove = __devexit_p(of_fsl_espi_remove), | 745 | .remove = __devexit_p(of_fsl_espi_remove), |
746 | }; | 746 | }; |
747 | 747 | module_platform_driver(fsl_espi_driver); | |
748 | static int __init fsl_espi_init(void) | ||
749 | { | ||
750 | return platform_driver_register(&fsl_espi_driver); | ||
751 | } | ||
752 | module_init(fsl_espi_init); | ||
753 | |||
754 | static void __exit fsl_espi_exit(void) | ||
755 | { | ||
756 | platform_driver_unregister(&fsl_espi_driver); | ||
757 | } | ||
758 | module_exit(fsl_espi_exit); | ||
759 | 748 | ||
760 | MODULE_AUTHOR("Mingkai Hu"); | 749 | MODULE_AUTHOR("Mingkai Hu"); |
761 | MODULE_DESCRIPTION("Enhanced Freescale SPI Driver"); | 750 | MODULE_DESCRIPTION("Enhanced Freescale SPI Driver"); |
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index 0e88ab745490..635ff08b377f 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
@@ -311,7 +311,7 @@ done: | |||
311 | return value; | 311 | return value; |
312 | } | 312 | } |
313 | 313 | ||
314 | static int __init spi_gpio_probe(struct platform_device *pdev) | 314 | static int __devinit spi_gpio_probe(struct platform_device *pdev) |
315 | { | 315 | { |
316 | int status; | 316 | int status; |
317 | struct spi_master *master; | 317 | struct spi_master *master; |
@@ -379,7 +379,7 @@ gpio_free: | |||
379 | return status; | 379 | return status; |
380 | } | 380 | } |
381 | 381 | ||
382 | static int __exit spi_gpio_remove(struct platform_device *pdev) | 382 | static int __devexit spi_gpio_remove(struct platform_device *pdev) |
383 | { | 383 | { |
384 | struct spi_gpio *spi_gpio; | 384 | struct spi_gpio *spi_gpio; |
385 | struct spi_gpio_platform_data *pdata; | 385 | struct spi_gpio_platform_data *pdata; |
@@ -408,21 +408,10 @@ MODULE_ALIAS("platform:" DRIVER_NAME); | |||
408 | static struct platform_driver spi_gpio_driver = { | 408 | static struct platform_driver spi_gpio_driver = { |
409 | .driver.name = DRIVER_NAME, | 409 | .driver.name = DRIVER_NAME, |
410 | .driver.owner = THIS_MODULE, | 410 | .driver.owner = THIS_MODULE, |
411 | .remove = __exit_p(spi_gpio_remove), | 411 | .probe = spi_gpio_probe, |
412 | .remove = __devexit_p(spi_gpio_remove), | ||
412 | }; | 413 | }; |
413 | 414 | module_platform_driver(spi_gpio_driver); | |
414 | static int __init spi_gpio_init(void) | ||
415 | { | ||
416 | return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe); | ||
417 | } | ||
418 | module_init(spi_gpio_init); | ||
419 | |||
420 | static void __exit spi_gpio_exit(void) | ||
421 | { | ||
422 | platform_driver_unregister(&spi_gpio_driver); | ||
423 | } | ||
424 | module_exit(spi_gpio_exit); | ||
425 | |||
426 | 415 | ||
427 | MODULE_DESCRIPTION("SPI master driver using generic bitbanged GPIO "); | 416 | MODULE_DESCRIPTION("SPI master driver using generic bitbanged GPIO "); |
428 | MODULE_AUTHOR("David Brownell"); | 417 | MODULE_AUTHOR("David Brownell"); |
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index fa594d604aca..c6e697f5e007 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c | |||
@@ -929,19 +929,7 @@ static struct platform_driver spi_imx_driver = { | |||
929 | .probe = spi_imx_probe, | 929 | .probe = spi_imx_probe, |
930 | .remove = __devexit_p(spi_imx_remove), | 930 | .remove = __devexit_p(spi_imx_remove), |
931 | }; | 931 | }; |
932 | 932 | module_platform_driver(spi_imx_driver); | |
933 | static int __init spi_imx_init(void) | ||
934 | { | ||
935 | return platform_driver_register(&spi_imx_driver); | ||
936 | } | ||
937 | |||
938 | static void __exit spi_imx_exit(void) | ||
939 | { | ||
940 | platform_driver_unregister(&spi_imx_driver); | ||
941 | } | ||
942 | |||
943 | module_init(spi_imx_init); | ||
944 | module_exit(spi_imx_exit); | ||
945 | 933 | ||
946 | MODULE_DESCRIPTION("SPI Master Controller driver"); | 934 | MODULE_DESCRIPTION("SPI Master Controller driver"); |
947 | MODULE_AUTHOR("Sascha Hauer, Pengutronix"); | 935 | MODULE_AUTHOR("Sascha Hauer, Pengutronix"); |
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index 6a5b4238fb6b..4c63f772780a 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c | |||
@@ -559,18 +559,7 @@ static struct platform_driver mpc512x_psc_spi_of_driver = { | |||
559 | .of_match_table = mpc512x_psc_spi_of_match, | 559 | .of_match_table = mpc512x_psc_spi_of_match, |
560 | }, | 560 | }, |
561 | }; | 561 | }; |
562 | 562 | module_platform_driver(mpc512x_psc_spi_of_driver); | |
563 | static int __init mpc512x_psc_spi_init(void) | ||
564 | { | ||
565 | return platform_driver_register(&mpc512x_psc_spi_of_driver); | ||
566 | } | ||
567 | module_init(mpc512x_psc_spi_init); | ||
568 | |||
569 | static void __exit mpc512x_psc_spi_exit(void) | ||
570 | { | ||
571 | platform_driver_unregister(&mpc512x_psc_spi_of_driver); | ||
572 | } | ||
573 | module_exit(mpc512x_psc_spi_exit); | ||
574 | 563 | ||
575 | MODULE_AUTHOR("John Rigby"); | 564 | MODULE_AUTHOR("John Rigby"); |
576 | MODULE_DESCRIPTION("MPC512x PSC SPI Driver"); | 565 | MODULE_DESCRIPTION("MPC512x PSC SPI Driver"); |
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c index e30baf0852ac..66047156d90d 100644 --- a/drivers/spi/spi-mpc52xx-psc.c +++ b/drivers/spi/spi-mpc52xx-psc.c | |||
@@ -511,18 +511,7 @@ static struct platform_driver mpc52xx_psc_spi_of_driver = { | |||
511 | .of_match_table = mpc52xx_psc_spi_of_match, | 511 | .of_match_table = mpc52xx_psc_spi_of_match, |
512 | }, | 512 | }, |
513 | }; | 513 | }; |
514 | 514 | module_platform_driver(mpc52xx_psc_spi_of_driver); | |
515 | static int __init mpc52xx_psc_spi_init(void) | ||
516 | { | ||
517 | return platform_driver_register(&mpc52xx_psc_spi_of_driver); | ||
518 | } | ||
519 | module_init(mpc52xx_psc_spi_init); | ||
520 | |||
521 | static void __exit mpc52xx_psc_spi_exit(void) | ||
522 | { | ||
523 | platform_driver_unregister(&mpc52xx_psc_spi_of_driver); | ||
524 | } | ||
525 | module_exit(mpc52xx_psc_spi_exit); | ||
526 | 515 | ||
527 | MODULE_AUTHOR("Dragos Carp"); | 516 | MODULE_AUTHOR("Dragos Carp"); |
528 | MODULE_DESCRIPTION("MPC52xx PSC SPI Driver"); | 517 | MODULE_DESCRIPTION("MPC52xx PSC SPI Driver"); |
diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 015a974bed72..57633d963456 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c | |||
@@ -564,16 +564,4 @@ static struct platform_driver mpc52xx_spi_of_driver = { | |||
564 | .probe = mpc52xx_spi_probe, | 564 | .probe = mpc52xx_spi_probe, |
565 | .remove = __devexit_p(mpc52xx_spi_remove), | 565 | .remove = __devexit_p(mpc52xx_spi_remove), |
566 | }; | 566 | }; |
567 | 567 | module_platform_driver(mpc52xx_spi_of_driver); | |
568 | static int __init mpc52xx_spi_init(void) | ||
569 | { | ||
570 | return platform_driver_register(&mpc52xx_spi_of_driver); | ||
571 | } | ||
572 | module_init(mpc52xx_spi_init); | ||
573 | |||
574 | static void __exit mpc52xx_spi_exit(void) | ||
575 | { | ||
576 | platform_driver_unregister(&mpc52xx_spi_of_driver); | ||
577 | } | ||
578 | module_exit(mpc52xx_spi_exit); | ||
579 | |||
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index c0a6ce81f9c0..e763254741c2 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c | |||
@@ -484,19 +484,7 @@ static struct platform_driver nuc900_spi_driver = { | |||
484 | .owner = THIS_MODULE, | 484 | .owner = THIS_MODULE, |
485 | }, | 485 | }, |
486 | }; | 486 | }; |
487 | 487 | module_platform_driver(nuc900_spi_driver); | |
488 | static int __init nuc900_spi_init(void) | ||
489 | { | ||
490 | return platform_driver_register(&nuc900_spi_driver); | ||
491 | } | ||
492 | |||
493 | static void __exit nuc900_spi_exit(void) | ||
494 | { | ||
495 | platform_driver_unregister(&nuc900_spi_driver); | ||
496 | } | ||
497 | |||
498 | module_init(nuc900_spi_init); | ||
499 | module_exit(nuc900_spi_exit); | ||
500 | 488 | ||
501 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); | 489 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); |
502 | MODULE_DESCRIPTION("nuc900 spi driver!"); | 490 | MODULE_DESCRIPTION("nuc900 spi driver!"); |
diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index f1bde66cea19..897274e8715c 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c | |||
@@ -406,18 +406,7 @@ static struct platform_driver tiny_spi_driver = { | |||
406 | .of_match_table = tiny_spi_match, | 406 | .of_match_table = tiny_spi_match, |
407 | }, | 407 | }, |
408 | }; | 408 | }; |
409 | 409 | module_platform_driver(tiny_spi_driver); | |
410 | static int __init tiny_spi_init(void) | ||
411 | { | ||
412 | return platform_driver_register(&tiny_spi_driver); | ||
413 | } | ||
414 | module_init(tiny_spi_init); | ||
415 | |||
416 | static void __exit tiny_spi_exit(void) | ||
417 | { | ||
418 | platform_driver_unregister(&tiny_spi_driver); | ||
419 | } | ||
420 | module_exit(tiny_spi_exit); | ||
421 | 410 | ||
422 | MODULE_DESCRIPTION("OpenCores tiny SPI driver"); | 411 | MODULE_DESCRIPTION("OpenCores tiny SPI driver"); |
423 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); | 412 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); |
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index 8ec43e07aa1e..98ec53285fc7 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c | |||
@@ -594,18 +594,7 @@ static struct platform_driver spi_ppc4xx_of_driver = { | |||
594 | .of_match_table = spi_ppc4xx_of_match, | 594 | .of_match_table = spi_ppc4xx_of_match, |
595 | }, | 595 | }, |
596 | }; | 596 | }; |
597 | 597 | module_platform_driver(spi_ppc4xx_of_driver); | |
598 | static int __init spi_ppc4xx_init(void) | ||
599 | { | ||
600 | return platform_driver_register(&spi_ppc4xx_of_driver); | ||
601 | } | ||
602 | module_init(spi_ppc4xx_init); | ||
603 | |||
604 | static void __exit spi_ppc4xx_exit(void) | ||
605 | { | ||
606 | platform_driver_unregister(&spi_ppc4xx_of_driver); | ||
607 | } | ||
608 | module_exit(spi_ppc4xx_exit); | ||
609 | 598 | ||
610 | MODULE_AUTHOR("Gary Jennejohn & Stefan Roese"); | 599 | MODULE_AUTHOR("Gary Jennejohn & Stefan Roese"); |
611 | MODULE_DESCRIPTION("Simple PPC4xx SPI Driver"); | 600 | MODULE_DESCRIPTION("Simple PPC4xx SPI Driver"); |
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index 1996ac57ef91..b857a3e7af94 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c | |||
@@ -505,7 +505,7 @@ static void s3c24xx_spi_initialsetup(struct s3c24xx_spi *hw) | |||
505 | } | 505 | } |
506 | } | 506 | } |
507 | 507 | ||
508 | static int __init s3c24xx_spi_probe(struct platform_device *pdev) | 508 | static int __devinit s3c24xx_spi_probe(struct platform_device *pdev) |
509 | { | 509 | { |
510 | struct s3c2410_spi_info *pdata; | 510 | struct s3c2410_spi_info *pdata; |
511 | struct s3c24xx_spi *hw; | 511 | struct s3c24xx_spi *hw; |
@@ -661,7 +661,7 @@ static int __init s3c24xx_spi_probe(struct platform_device *pdev) | |||
661 | return err; | 661 | return err; |
662 | } | 662 | } |
663 | 663 | ||
664 | static int __exit s3c24xx_spi_remove(struct platform_device *dev) | 664 | static int __devexit s3c24xx_spi_remove(struct platform_device *dev) |
665 | { | 665 | { |
666 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); | 666 | struct s3c24xx_spi *hw = platform_get_drvdata(dev); |
667 | 667 | ||
@@ -719,26 +719,15 @@ static const struct dev_pm_ops s3c24xx_spi_pmops = { | |||
719 | 719 | ||
720 | MODULE_ALIAS("platform:s3c2410-spi"); | 720 | MODULE_ALIAS("platform:s3c2410-spi"); |
721 | static struct platform_driver s3c24xx_spi_driver = { | 721 | static struct platform_driver s3c24xx_spi_driver = { |
722 | .remove = __exit_p(s3c24xx_spi_remove), | 722 | .probe = s3c24xx_spi_probe, |
723 | .remove = __devexit_p(s3c24xx_spi_remove), | ||
723 | .driver = { | 724 | .driver = { |
724 | .name = "s3c2410-spi", | 725 | .name = "s3c2410-spi", |
725 | .owner = THIS_MODULE, | 726 | .owner = THIS_MODULE, |
726 | .pm = S3C24XX_SPI_PMOPS, | 727 | .pm = S3C24XX_SPI_PMOPS, |
727 | }, | 728 | }, |
728 | }; | 729 | }; |
729 | 730 | module_platform_driver(s3c24xx_spi_driver); | |
730 | static int __init s3c24xx_spi_init(void) | ||
731 | { | ||
732 | return platform_driver_probe(&s3c24xx_spi_driver, s3c24xx_spi_probe); | ||
733 | } | ||
734 | |||
735 | static void __exit s3c24xx_spi_exit(void) | ||
736 | { | ||
737 | platform_driver_unregister(&s3c24xx_spi_driver); | ||
738 | } | ||
739 | |||
740 | module_init(s3c24xx_spi_init); | ||
741 | module_exit(s3c24xx_spi_exit); | ||
742 | 731 | ||
743 | MODULE_DESCRIPTION("S3C24XX SPI Driver"); | 732 | MODULE_DESCRIPTION("S3C24XX SPI Driver"); |
744 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | 733 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); |
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index e38554f89256..0f4834ae28cd 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
@@ -730,18 +730,7 @@ static struct platform_driver sh_msiof_spi_drv = { | |||
730 | .pm = &sh_msiof_spi_dev_pm_ops, | 730 | .pm = &sh_msiof_spi_dev_pm_ops, |
731 | }, | 731 | }, |
732 | }; | 732 | }; |
733 | 733 | module_platform_driver(sh_msiof_spi_drv); | |
734 | static int __init sh_msiof_spi_init(void) | ||
735 | { | ||
736 | return platform_driver_register(&sh_msiof_spi_drv); | ||
737 | } | ||
738 | module_init(sh_msiof_spi_init); | ||
739 | |||
740 | static void __exit sh_msiof_spi_exit(void) | ||
741 | { | ||
742 | platform_driver_unregister(&sh_msiof_spi_drv); | ||
743 | } | ||
744 | module_exit(sh_msiof_spi_exit); | ||
745 | 734 | ||
746 | MODULE_DESCRIPTION("SuperH MSIOF SPI Master Interface Driver"); | 735 | MODULE_DESCRIPTION("SuperH MSIOF SPI Master Interface Driver"); |
747 | MODULE_AUTHOR("Magnus Damm"); | 736 | MODULE_AUTHOR("Magnus Damm"); |
diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index e7779c09f6ef..8844bc342782 100644 --- a/drivers/spi/spi-sh-sci.c +++ b/drivers/spi/spi-sh-sci.c | |||
@@ -186,18 +186,7 @@ static struct platform_driver sh_sci_spi_drv = { | |||
186 | .owner = THIS_MODULE, | 186 | .owner = THIS_MODULE, |
187 | }, | 187 | }, |
188 | }; | 188 | }; |
189 | 189 | module_platform_driver(sh_sci_spi_drv); | |
190 | static int __init sh_sci_spi_init(void) | ||
191 | { | ||
192 | return platform_driver_register(&sh_sci_spi_drv); | ||
193 | } | ||
194 | module_init(sh_sci_spi_init); | ||
195 | |||
196 | static void __exit sh_sci_spi_exit(void) | ||
197 | { | ||
198 | platform_driver_unregister(&sh_sci_spi_drv); | ||
199 | } | ||
200 | module_exit(sh_sci_spi_exit); | ||
201 | 190 | ||
202 | MODULE_DESCRIPTION("SH SCI SPI Driver"); | 191 | MODULE_DESCRIPTION("SH SCI SPI Driver"); |
203 | MODULE_AUTHOR("Magnus Damm <damm@opensource.se>"); | 192 | MODULE_AUTHOR("Magnus Damm <damm@opensource.se>"); |
diff --git a/drivers/spi/spi-sh.c b/drivers/spi/spi-sh.c index e0343d48da6c..70c8af9f7ccc 100644 --- a/drivers/spi/spi-sh.c +++ b/drivers/spi/spi-sh.c | |||
@@ -524,18 +524,7 @@ static struct platform_driver spi_sh_driver = { | |||
524 | .owner = THIS_MODULE, | 524 | .owner = THIS_MODULE, |
525 | }, | 525 | }, |
526 | }; | 526 | }; |
527 | 527 | module_platform_driver(spi_sh_driver); | |
528 | static int __init spi_sh_init(void) | ||
529 | { | ||
530 | return platform_driver_register(&spi_sh_driver); | ||
531 | } | ||
532 | module_init(spi_sh_init); | ||
533 | |||
534 | static void __exit spi_sh_exit(void) | ||
535 | { | ||
536 | platform_driver_unregister(&spi_sh_driver); | ||
537 | } | ||
538 | module_exit(spi_sh_exit); | ||
539 | 528 | ||
540 | MODULE_DESCRIPTION("SH SPI bus driver"); | 529 | MODULE_DESCRIPTION("SH SPI bus driver"); |
541 | MODULE_LICENSE("GPL"); | 530 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/spi/spi-stmp.c b/drivers/spi/spi-stmp.c index fadff76eb7e0..58e385285323 100644 --- a/drivers/spi/spi-stmp.c +++ b/drivers/spi/spi-stmp.c | |||
@@ -659,19 +659,8 @@ static struct platform_driver stmp_spi_driver = { | |||
659 | .suspend = stmp_spi_suspend, | 659 | .suspend = stmp_spi_suspend, |
660 | .resume = stmp_spi_resume, | 660 | .resume = stmp_spi_resume, |
661 | }; | 661 | }; |
662 | module_platform_driver(stmp_spi_driver); | ||
662 | 663 | ||
663 | static int __init stmp_spi_init(void) | ||
664 | { | ||
665 | return platform_driver_register(&stmp_spi_driver); | ||
666 | } | ||
667 | |||
668 | static void __exit stmp_spi_exit(void) | ||
669 | { | ||
670 | platform_driver_unregister(&stmp_spi_driver); | ||
671 | } | ||
672 | |||
673 | module_init(stmp_spi_init); | ||
674 | module_exit(stmp_spi_exit); | ||
675 | module_param(pio, int, S_IRUGO); | 664 | module_param(pio, int, S_IRUGO); |
676 | module_param(clock, int, S_IRUGO); | 665 | module_param(clock, int, S_IRUGO); |
677 | MODULE_AUTHOR("dmitry pervushin <dpervushin@embeddedalley.com>"); | 666 | MODULE_AUTHOR("dmitry pervushin <dpervushin@embeddedalley.com>"); |
diff --git a/drivers/spi/spi-tegra.c b/drivers/spi/spi-tegra.c index e8cd58f63e22..ae6d78a3e912 100644 --- a/drivers/spi/spi-tegra.c +++ b/drivers/spi/spi-tegra.c | |||
@@ -465,7 +465,7 @@ static int spi_tegra_transfer(struct spi_device *spi, struct spi_message *m) | |||
465 | return 0; | 465 | return 0; |
466 | } | 466 | } |
467 | 467 | ||
468 | static int __init spi_tegra_probe(struct platform_device *pdev) | 468 | static int __devinit spi_tegra_probe(struct platform_device *pdev) |
469 | { | 469 | { |
470 | struct spi_master *master; | 470 | struct spi_master *master; |
471 | struct spi_tegra_data *tspi; | 471 | struct spi_tegra_data *tspi; |
@@ -613,19 +613,9 @@ static struct platform_driver spi_tegra_driver = { | |||
613 | .owner = THIS_MODULE, | 613 | .owner = THIS_MODULE, |
614 | .of_match_table = spi_tegra_of_match_table, | 614 | .of_match_table = spi_tegra_of_match_table, |
615 | }, | 615 | }, |
616 | .probe = spi_tegra_probe, | ||
616 | .remove = __devexit_p(spi_tegra_remove), | 617 | .remove = __devexit_p(spi_tegra_remove), |
617 | }; | 618 | }; |
618 | 619 | module_platform_driver(spi_tegra_driver); | |
619 | static int __init spi_tegra_init(void) | ||
620 | { | ||
621 | return platform_driver_probe(&spi_tegra_driver, spi_tegra_probe); | ||
622 | } | ||
623 | module_init(spi_tegra_init); | ||
624 | |||
625 | static void __exit spi_tegra_exit(void) | ||
626 | { | ||
627 | platform_driver_unregister(&spi_tegra_driver); | ||
628 | } | ||
629 | module_exit(spi_tegra_exit); | ||
630 | 620 | ||
631 | MODULE_LICENSE("GPL"); | 621 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/spi/spi-ti-ssp.c b/drivers/spi/spi-ti-ssp.c index ee22795c7973..7963c60063d6 100644 --- a/drivers/spi/spi-ti-ssp.c +++ b/drivers/spi/spi-ti-ssp.c | |||
@@ -383,18 +383,7 @@ static struct platform_driver ti_ssp_spi_driver = { | |||
383 | .owner = THIS_MODULE, | 383 | .owner = THIS_MODULE, |
384 | }, | 384 | }, |
385 | }; | 385 | }; |
386 | 386 | module_platform_driver(ti_ssp_spi_driver); | |
387 | static int __init ti_ssp_spi_init(void) | ||
388 | { | ||
389 | return platform_driver_register(&ti_ssp_spi_driver); | ||
390 | } | ||
391 | module_init(ti_ssp_spi_init); | ||
392 | |||
393 | static void __exit ti_ssp_spi_exit(void) | ||
394 | { | ||
395 | platform_driver_unregister(&ti_ssp_spi_driver); | ||
396 | } | ||
397 | module_exit(ti_ssp_spi_exit); | ||
398 | 387 | ||
399 | MODULE_DESCRIPTION("SSP SPI Master"); | 388 | MODULE_DESCRIPTION("SSP SPI Master"); |
400 | MODULE_AUTHOR("Cyril Chemparathy"); | 389 | MODULE_AUTHOR("Cyril Chemparathy"); |
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index 4d2c75df886c..4c5a663b9fa8 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c | |||
@@ -538,18 +538,7 @@ static struct platform_driver xilinx_spi_driver = { | |||
538 | .of_match_table = xilinx_spi_of_match, | 538 | .of_match_table = xilinx_spi_of_match, |
539 | }, | 539 | }, |
540 | }; | 540 | }; |
541 | 541 | module_platform_driver(xilinx_spi_driver); | |
542 | static int __init xilinx_spi_pltfm_init(void) | ||
543 | { | ||
544 | return platform_driver_register(&xilinx_spi_driver); | ||
545 | } | ||
546 | module_init(xilinx_spi_pltfm_init); | ||
547 | |||
548 | static void __exit xilinx_spi_pltfm_exit(void) | ||
549 | { | ||
550 | platform_driver_unregister(&xilinx_spi_driver); | ||
551 | } | ||
552 | module_exit(xilinx_spi_pltfm_exit); | ||
553 | 542 | ||
554 | MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); | 543 | MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); |
555 | MODULE_DESCRIPTION("Xilinx SPI driver"); | 544 | MODULE_DESCRIPTION("Xilinx SPI driver"); |