Commit 4e92cac8 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

net: encx24j600: 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 <weiyongjun1@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a18f19e9
......@@ -1117,17 +1117,7 @@ static struct spi_driver encx24j600_spi_net_driver = {
.id_table = encx24j600_spi_id_table,
};
static int __init encx24j600_init(void)
{
return spi_register_driver(&encx24j600_spi_net_driver);
}
module_init(encx24j600_init);
static void encx24j600_exit(void)
{
spi_unregister_driver(&encx24j600_spi_net_driver);
}
module_exit(encx24j600_exit);
module_spi_driver(encx24j600_spi_net_driver);
MODULE_DESCRIPTION(DRV_NAME " ethernet driver");
MODULE_AUTHOR("Jon Ringle <jringle@gridpoint.com>");
......
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