aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2013-02-04 07:26:26 -0500
committerGrant Likely <grant.likely@secretlab.ca>2013-02-05 09:44:14 -0500
commit41ab724aac00cae42e649496c2567e9ef45dd753 (patch)
tree0e181cbc48204261ac50734418ac6cddac99e115 /drivers
parentc0fde3ba0e03af30f9fa9cdf180442189b3f7e9c (diff)
spi/orion: Use module_platform_driver()
This patch reduces and simplifies initalization code by using module_platform_driver(). With this change it's necessary to remove the __init annotation to avoid section mismatch warnings. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/spi/spi-orion.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 6a3cdc7cfeaf..66a5f82cf138 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -513,20 +513,11 @@ static struct platform_driver orion_spi_driver = {
513 .owner = THIS_MODULE, 513 .owner = THIS_MODULE,
514 .of_match_table = of_match_ptr(orion_spi_of_match_table), 514 .of_match_table = of_match_ptr(orion_spi_of_match_table),
515 }, 515 },
516 .probe = orion_spi_probe,
516 .remove = orion_spi_remove, 517 .remove = orion_spi_remove,
517}; 518};
518 519
519static int __init orion_spi_init(void) 520module_platform_driver(orion_spi_driver);
520{
521 return platform_driver_probe(&orion_spi_driver, orion_spi_probe);
522}
523module_init(orion_spi_init);
524
525static void __exit orion_spi_exit(void)
526{
527 platform_driver_unregister(&orion_spi_driver);
528}
529module_exit(orion_spi_exit);
530 521
531MODULE_DESCRIPTION("Orion SPI driver"); 522MODULE_DESCRIPTION("Orion SPI driver");
532MODULE_AUTHOR("Shadi Ammouri <shadi@marvell.com>"); 523MODULE_AUTHOR("Shadi Ammouri <shadi@marvell.com>");