netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dlink: dl2k: use the module_pci_driver macro
@ 2012-10-26 19:29 Devendra Naga
  2012-10-31 18:04 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Devendra Naga @ 2012-10-26 19:29 UTC (permalink / raw)
  To: Francois Romieu, netdev; +Cc: Devendra Naga

use the module_pci_driver macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 drivers/net/ethernet/dlink/dl2k.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index a059f0c..2fb01bf 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -1758,21 +1758,7 @@ static struct pci_driver rio_driver = {
 	.remove		= __devexit_p(rio_remove1),
 };
 
-static int __init
-rio_init (void)
-{
-	return pci_register_driver(&rio_driver);
-}
-
-static void __exit
-rio_exit (void)
-{
-	pci_unregister_driver (&rio_driver);
-}
-
-module_init (rio_init);
-module_exit (rio_exit);
-
+module_pci_driver(rio_driver);
 /*
 
 Compile command:
-- 
1.7.9.5

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

* Re: [PATCH] dlink: dl2k: use the module_pci_driver macro
  2012-10-26 19:29 [PATCH] dlink: dl2k: use the module_pci_driver macro Devendra Naga
@ 2012-10-31 18:04 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-10-31 18:04 UTC (permalink / raw)
  To: devendra.aaru; +Cc: romieu, netdev

From: Devendra Naga <devendra.aaru@gmail.com>
Date: Fri, 26 Oct 2012 15:29:00 -0400

> use the module_pci_driver macro to make the code simpler
> by eliminating module_init and module_exit calls.
> 
> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>

Applied.

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

end of thread, other threads:[~2012-10-31 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 19:29 [PATCH] dlink: dl2k: use the module_pci_driver macro Devendra Naga
2012-10-31 18:04 ` 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).