Skip to content

Commit

Permalink
r6040: use module_pci_driver macro
Browse files Browse the repository at this point in the history
as the manual of module_pci_driver says that
it can be used when the init and exit functions of
the module does nothing but the pci_register_driver
and pci_unregister_driver.

use it for rdc's r6040 driver, as the init and exit
paths does as above, and also this reduces a little
amount of code.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Devendra Naga authored and David S. Miller committed Jul 9, 2012
1 parent a334b5f commit 36efc94
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/net/ethernet/rdc/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,17 +1277,4 @@ static struct pci_driver r6040_driver = {
.remove = __devexit_p(r6040_remove_one),
};


static int __init r6040_init(void)
{
return pci_register_driver(&r6040_driver);
}


static void __exit r6040_cleanup(void)
{
pci_unregister_driver(&r6040_driver);
}

module_init(r6040_init);
module_exit(r6040_cleanup);
module_pci_driver(r6040_driver);

0 comments on commit 36efc94

Please sign in to comment.