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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wei Yongjun 2013-04-08 20:34:44 +00:00 committed by David S. Miller
parent 6ffd464102
commit 3d4a131628

View File

@ -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");