Skip to content

Commit

Permalink
net: pch_gbe: Use module_pci_driver()
Browse files Browse the repository at this point in the history
Make use of the module_pci_driver() macro to remove some needless
boilerplate code from the pch_gbe driver. This does have the side effect
of removing the print of the driver's version during probe, but this is
pretty useless information anyway - the version has changed only once
whilst the driver has been in mainline, despite many changes being made
to it before and since.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Paul Burton authored and David S. Miller committed Jun 23, 2018
1 parent 90e3f63 commit 99a9c28
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2770,24 +2770,7 @@ static struct pci_driver pch_gbe_driver = {
.shutdown = pch_gbe_shutdown,
.err_handler = &pch_gbe_err_handler
};


static int __init pch_gbe_init_module(void)
{
int ret;

pr_info("EG20T PCH Gigabit Ethernet Driver - version %s\n",DRV_VERSION);
ret = pci_register_driver(&pch_gbe_driver);
return ret;
}

static void __exit pch_gbe_exit_module(void)
{
pci_unregister_driver(&pch_gbe_driver);
}

module_init(pch_gbe_init_module);
module_exit(pch_gbe_exit_module);
module_pci_driver(pch_gbe_driver);

MODULE_DESCRIPTION("EG20T PCH Gigabit ethernet Driver");
MODULE_AUTHOR("LAPIS SEMICONDUCTOR, <tshimizu818@gmail.com>");
Expand Down

0 comments on commit 99a9c28

Please sign in to comment.