cw1200: use module_spi_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 30 May 2013 11:42:54 +0000 (19:42 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 30 May 2013 18:45:25 +0000 (14:45 -0400)
module_spi_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/cw1200/cw1200_spi.c

index b957d4a..feb541b 100644 (file)
@@ -468,17 +468,4 @@ static struct spi_driver spi_driver = {
        },
 };
 
-/* Init Module function -> Called by insmod */
-static int __init cw1200_spi_init(void)
-{
-       return spi_register_driver(&spi_driver);
-}
-
-/* Called at Driver Unloading */
-static void __exit cw1200_spi_exit(void)
-{
-       spi_unregister_driver(&spi_driver);
-}
-
-module_init(cw1200_spi_init);
-module_exit(cw1200_spi_exit);
+module_spi_driver(spi_driver);