* [PATCH -next] mrf24j40: use module_spi_driver to simplify the code
@ 2013-04-09 6:34 Wei Yongjun
[not found] ` <CAPgLHd_Ci0u45-C0y7NV66zim8zZgBY+VjmW2iBdgG2OoL5CyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-04-09 6:34 UTC (permalink / raw)
To: alex.bluesman.smirnov, dbaryshkov; +Cc: yongjun_wei, linux-zigbee-devel, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
module_spi_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
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 ca00351..eca7165 100644
--- a/drivers/net/ieee802154/mrf24j40.c
+++ b/drivers/net/ieee802154/mrf24j40.c
@@ -756,18 +756,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");
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-09 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 6:34 [PATCH -next] mrf24j40: use module_spi_driver to simplify the code Wei Yongjun
[not found] ` <CAPgLHd_Ci0u45-C0y7NV66zim8zZgBY+VjmW2iBdgG2OoL5CyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-09 17:20 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).