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:
parent
6ffd464102
commit
3d4a131628
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue