提交 3d4a1316 编写于 作者: W Wei Yongjun 提交者: David S. Miller

mrf24j40: use module_spi_driver to simplify the code

module_spi_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ffd4641
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册