mrf24j40: use module_spi_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 8 Apr 2013 20:34:44 +0000 (20:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Apr 2013 17:19:38 +0000 (13:19 -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: David S. Miller <davem@davemloft.net>
drivers/net/ieee802154/mrf24j40.c

index 3d3c529e76ec29a7803124f53117ee38f123a45d..ede3ce4912f92162b9411167fb8cab5ea248c479 100644 (file)
@@ -759,18 +759,7 @@ static struct spi_driver mrf24j40_driver = {
        .remove = mrf24j40_remove,
 };
 
-static int __init mrf24j40_init(void)
-{
-       return spi_register_driver(&mrf24j40_driver);
-}
-
-static void __exit mrf24j40_exit(void)
-{
-       spi_unregister_driver(&mrf24j40_driver);
-}
-
-module_init(mrf24j40_init);
-module_exit(mrf24j40_exit);
+module_spi_driver(mrf24j40_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Alan Ott");