projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afa2420
)
net: ethernet: 8390: ne2k-pci: use module_pci_driver() macro
author
Yang Yingliang
<yangyingliang@huawei.com>
Thu, 10 Aug 2023 01:46:33 +0000
(09:46 +0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Fri, 11 Aug 2023 02:31:57 +0000
(19:31 -0700)
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: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Link:
https://lore.kernel.org/r/20230810014633.3084355-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/8390/ne2k-pci.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/8390/ne2k-pci.c
b/drivers/net/ethernet/8390/ne2k-pci.c
index
2c6bd36
..
65f56a9
100644
(file)
--- a/
drivers/net/ethernet/8390/ne2k-pci.c
+++ b/
drivers/net/ethernet/8390/ne2k-pci.c
@@
-731,18
+731,4
@@
static struct pci_driver ne2k_driver = {
.id_table = ne2k_pci_tbl,
.driver.pm = &ne2k_pci_pm_ops,
};
-
-
-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);
+module_pci_driver(ne2k_driver);