[patch 1/2] drivers/pcmcia/pd6729.c: convert to module_pci_driver

akpm at linux-foundation.org akpm at linux-foundation.org
Fri Sep 13 17:49:41 EDT 2013


From: Libo Chen <libo.chen at huawei.com>
Subject: drivers/pcmcia/pd6729.c: convert to module_pci_driver

Use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen at huawei.com>
Cc: Bill Pemberton <wfp5p at virginia.edu>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: Eric Miao <eric.y.miao at gmail.com>
Cc: Dominik Brodowski <linux at dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
---

 drivers/pcmcia/pd6729.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff -puN drivers/pcmcia/pd6729.c~drivers-pcmcia-pd6729c-convert-to-module_pci_driver drivers/pcmcia/pd6729.c
--- a/drivers/pcmcia/pd6729.c~drivers-pcmcia-pd6729c-convert-to-module_pci_driver
+++ a/drivers/pcmcia/pd6729.c
@@ -777,15 +777,4 @@ static struct pci_driver pd6729_pci_driv
 	.remove		= pd6729_pci_remove,
 };
 
-static int pd6729_module_init(void)
-{
-	return pci_register_driver(&pd6729_pci_driver);
-}
-
-static void pd6729_module_exit(void)
-{
-	pci_unregister_driver(&pd6729_pci_driver);
-}
-
-module_init(pd6729_module_init);
-module_exit(pd6729_module_exit);
+module_pci_driver(pd6729_pci_driver);
_



More information about the linux-pcmcia mailing list