From: Wei Yongjun Date: Thu, 30 May 2013 11:42:54 +0000 (+0800) Subject: cw1200: use module_spi_driver to simplify the code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d071c0430c6ae42fedec78f1ec2e37603adb8c78;p=linux-beck.git cw1200: use module_spi_driver to simplify the code module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index b957d4a01c52..feb541bb507c 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -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);