提交 75498aa1 编写于 作者: W Wei Yongjun 提交者: David S. Miller

net: cavium: use module_pci_driver to simplify the code

Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 335ab8ba
......@@ -336,18 +336,7 @@ static struct pci_driver cavium_ptp_driver = {
.remove = cavium_ptp_remove,
};
static int __init cavium_ptp_init_module(void)
{
return pci_register_driver(&cavium_ptp_driver);
}
static void __exit cavium_ptp_cleanup_module(void)
{
pci_unregister_driver(&cavium_ptp_driver);
}
module_init(cavium_ptp_init_module);
module_exit(cavium_ptp_cleanup_module);
module_pci_driver(cavium_ptp_driver);
MODULE_DESCRIPTION(DRV_NAME);
MODULE_AUTHOR("Cavium Networks <support@cavium.com>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册