Commit 5604ac35 authored by Yang Yingliang's avatar Yang Yingliang Committed by Jakub Kicinski

net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro

The driver init/exit() function don't do anything special, it
can use the module_pci_driver() macro to eliminate boilerplate
code.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Reviewed-by: default avatarPavan Chebbi <pavan.chebbi@broadcom.com>
Link: https://lore.kernel.org/r/20230810014633.3084355-1-yangyingliang@huawei.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent afa2420c
...@@ -731,18 +731,4 @@ static struct pci_driver ne2k_driver = { ...@@ -731,18 +731,4 @@ static struct pci_driver ne2k_driver = {
.id_table = ne2k_pci_tbl, .id_table = ne2k_pci_tbl,
.driver.pm = &ne2k_pci_pm_ops, .driver.pm = &ne2k_pci_pm_ops,
}; };
module_pci_driver(ne2k_driver);
static int __init ne2k_pci_init(void)
{
return pci_register_driver(&ne2k_driver);
}
static void __exit ne2k_pci_cleanup(void)
{
pci_unregister_driver(&ne2k_driver);
}
module_init(ne2k_pci_init);
module_exit(ne2k_pci_cleanup);
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