* [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
* Re: [PATCH -next] mrf24j40: use module_spi_driver to simplify the code
[not found] ` <CAPgLHd_Ci0u45-C0y7NV66zim8zZgBY+VjmW2iBdgG2OoL5CyA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-04-09 17:20 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-04-09 17:20 UTC (permalink / raw)
To: weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
From: Wei Yongjun <weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Tue, 9 Apr 2013 14:34:44 +0800
> From: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
>
> module_spi_driver() makes the code simpler by eliminating
> boilerplate code.
>
> Signed-off-by: Wei Yongjun <yongjun_wei-zrsr2BFq86L20UzCJQGyNP8+0UxHXcjY@public.gmane.org>
Applied.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
^ permalink raw reply [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).