From 3d4a1316286d037c29a36a8451a9612f60404ef7 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Mon, 8 Apr 2013 20:34:44 +0000 Subject: [PATCH] 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 Signed-off-by: David S. Miller --- drivers/net/ieee802154/mrf24j40.c | 13 +------------ 1 file changed, 1 insertion(+), 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"); -- GitLab