Skip to content

Commit d82cb7b

Browse files
EthanNelson-MoorePaolo Abeni
authored andcommitted
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>
1 parent 3082796 commit d82cb7b

1 file changed

Lines changed: 1 addition & 14 deletions

File tree

drivers/net/arcnet/com20020-pci.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -618,17 +618,4 @@ static struct pci_driver com20020pci_driver = {
618618
.remove = com20020pci_remove,
619619
};
620620

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);

0 commit comments

Comments
 (0)