summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-04-08 22:34:44 +0200
committerDavid S. Miller <davem@davemloft.net>2013-04-09 19:19:38 +0200
commit3d4a1316286d037c29a36a8451a9612f60404ef7 (patch)
treeb27c730eadb1f2fdb8ef5835f377fb81d4488420 /drivers
parentnetprio_cgroup: remove task_struct parameter from sock_update_netprio() (diff)
downloadlinux-3d4a1316286d037c29a36a8451a9612f60404ef7.tar.xz
linux-3d4a1316286d037c29a36a8451a9612f60404ef7.zip
mrf24j40: use module_spi_driver to simplify the code
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ieee802154/mrf24j40.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/ieee802154/mrf24j40.c b/drivers/net/ieee802154/mrf24j40.c
index 3d3c529e76ec..ede3ce4912f9 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -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");