Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260205070632.37516-1-enelsonmoore@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Ethan Nelson-Moore and committed by
Paolo Abeni
d82cb7b7 30827969

+1 -14
+1 -14
drivers/net/arcnet/com20020-pci.c
··· 618 618 .remove = com20020pci_remove, 619 619 }; 620 620 621 - static int __init com20020pci_init(void) 622 - { 623 - if (BUGLVL(D_NORMAL)) 624 - pr_info("%s\n", "COM20020 PCI support"); 625 - return pci_register_driver(&com20020pci_driver); 626 - } 627 - 628 - static void __exit com20020pci_cleanup(void) 629 - { 630 - pci_unregister_driver(&com20020pci_driver); 631 - } 632 - 633 - module_init(com20020pci_init) 634 - module_exit(com20020pci_cleanup) 621 + module_pci_driver(com20020pci_driver);