netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] r6040: use module_pci_driver macro
@ 2012-07-08 15:57 Devendra Naga
  2012-07-08 21:39 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Devendra Naga @ 2012-07-08 15:57 UTC (permalink / raw)
  To: Florian Fainelli, netdev; +Cc: Devendra Naga

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>
---
 drivers/net/ethernet/rdc/r6040.c |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 9acc026..557a265 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);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-09 21:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-08 15:57 [PATCH] r6040: use module_pci_driver macro Devendra Naga
2012-07-08 21:39 ` Florian Fainelli
2012-07-09 21:43   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).