diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2018-03-28 15:51:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-29 21:36:33 +0300 |
commit | 75498aa1aff5dfed0124557dfa0b6b2906b14fa6 (patch) | |
tree | 782d76f22f98d123dd5a349bb99db3784830a9be /drivers/net/ethernet/cavium | |
parent | 335ab8ba617ec5bdc0c1595aae875304277e2495 (diff) | |
download | linux-75498aa1aff5dfed0124557dfa0b6b2906b14fa6.tar.xz |
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: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r-- | drivers/net/ethernet/cavium/common/cavium_ptp.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/ethernet/cavium/common/cavium_ptp.c b/drivers/net/ethernet/cavium/common/cavium_ptp.c index d59497a7bdce..6aeb1045c302 100644 --- a/drivers/net/ethernet/cavium/common/cavium_ptp.c +++ b/drivers/net/ethernet/cavium/common/cavium_ptp.c @@ -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>"); |