Commit 3d4a1316 authored by Wei Yongjun's avatar Wei Yongjun Committed by 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6ffd4641
...@@ -759,18 +759,7 @@ static struct spi_driver mrf24j40_driver = { ...@@ -759,18 +759,7 @@ static struct spi_driver mrf24j40_driver = {
.remove = mrf24j40_remove, .remove = mrf24j40_remove,
}; };
static int __init mrf24j40_init(void) module_spi_driver(mrf24j40_driver);
{
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_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Alan Ott"); MODULE_AUTHOR("Alan Ott");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment