mmc: mmc_spi: Use module_spi_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Aug 2012 06:23:42 +0000 (11:53 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:29 +0000 (13:58 -0400)
module_spi_driver makes the code simpler by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/mmc_spi.c

index 273306c68d58e916d8a588fffb8fd73385c405f2..a600eabbd6c30671a4b3d318974dc9f8af728590 100644 (file)
@@ -1532,20 +1532,7 @@ static struct spi_driver mmc_spi_driver = {
        .remove =       __devexit_p(mmc_spi_remove),
 };
 
-
-static int __init mmc_spi_init(void)
-{
-       return spi_register_driver(&mmc_spi_driver);
-}
-module_init(mmc_spi_init);
-
-
-static void __exit mmc_spi_exit(void)
-{
-       spi_unregister_driver(&mmc_spi_driver);
-}
-module_exit(mmc_spi_exit);
-
+module_spi_driver(mmc_spi_driver);
 
 MODULE_AUTHOR("Mike Lavender, David Brownell, "
                "Hans-Peter Nilsson, Jan Nikitenko");