net: arcnet: com20020-pci: use module_pci_driver
Subsystems (3)
PATCH 1/1 net: arcnet: com20020-pci: use module_pci_driver
The only thing this driver's init/exit functions do is call pci_register/unregister_driver, and in the case of the init function, print an unnecessary message. Replace them with module_pci_driver to simplify the code.
--- drivers/net/arcnet/com20020-pci.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/arcnet/com20020-pci.c +1 -14
@@ -618,17 +618,4 @@ static struct pci_driver com20020pci_driver = { .remove = com20020pci_remove, }; -static int __init com20020pci_init (void ) -{ -if (BUGLVL (D_NORMAL )) -pr_info ("%s\n" ,"COM20020 PCI support" ); -return pci_register_driver (&com20020pci_driver); -} - -static void __exit com20020pci_cleanup(void) -{ -pci_unregister_driver (&com20020pci_driver); -} - -module_init (com20020pci_init) -module_exit (com20020pci_cleanup) +module_pci_driver (com20020pci_driver);
Signature · 1 line
2.43.0
Quoted 6 lines · Ethan Nelson-Moore
The only thing this driver's init/exit functions do is call pci_register/unregister_driver, and in the case of the init function, print an unnecessary message. Replace them with
module_pci_driverto simplify the code.Signed-off-by Ethan Nelson-Moore <[email protected]>
I'm not sure that I see the value of cleanups to this driver. Which hasn't seen much activity for a while now.
But I agree the change is correct.
...
Hi, Simon,
Quoted 2 lines · Simon Horman
I'm not sure that I see the value of cleanups to this driver. Which hasn't seen much activity for a while now.
That probably indicates that it has no major issues, not that it isn't being used. ARCnet cards are still actively sold by Contemporary Controls and SOHARD; ARCnet is used in industrial environments where its timing determinism is important.
Ethan
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Wed, 4 Feb 2026 23:06:31 -0800 you wrote:
The only thing this driver's init/exit functions do is call pci_register/unregister_driver, and in the case of the init function, print an unnecessary message. Replace them with
module_pci_driverto simplify the code.Signed-off-by Ethan Nelson-Moore <[email protected]>[...]
Here is the summary with links:
- [net-next] net: arcnet: com20020-pci: use module_pci_driver
https://git.kernel.org/netdev/net-next/c/d82cb7b7ec42
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html