diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-07-08 05:57:57 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-09 14:42:30 -0700 |
commit | 36efc94b1d09e75fc18b400b0fba8220f967fb44 (patch) | |
tree | e96a3c73cb6bd0f6457fcf334bddb61804b44a32 /drivers/net/ethernet/rdc | |
parent | a334b5fb19d3f17953f73bb6de516a29317fb7f7 (diff) | |
download | linux-next-36efc94b1d09e75fc18b400b0fba8220f967fb44.tar.gz |
r6040: use module_pci_driver macro
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>
Diffstat (limited to 'drivers/net/ethernet/rdc')
-rw-r--r-- | drivers/net/ethernet/rdc/r6040.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index 9acc026f62e8..557a26545d75 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c @@ -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); |