From: Wei Yongjun Date: Mon, 8 Apr 2013 20:34:44 +0000 (+0000) Subject: mrf24j40: use module_spi_driver to simplify the code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d4a1316286d037c29a36a8451a9612f60404ef7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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");