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

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


From: Libo Chen <libo.chen at huawei.com>
Subject: drivers/pcmcia/yenta_socket.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: Dominik Brodowski <linux at dominikbrodowski.net>
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: Bjorn Helgaas <bhelgaas at google.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
---

 drivers/pcmcia/yenta_socket.c |   16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff -puN drivers/pcmcia/yenta_socket.c~drivers-pcmcia-yenta_socketc-convert-to-module_pci_driver drivers/pcmcia/yenta_socket.c
--- a/drivers/pcmcia/yenta_socket.c~drivers-pcmcia-yenta_socketc-convert-to-module_pci_driver
+++ a/drivers/pcmcia/yenta_socket.c
@@ -1439,20 +1439,6 @@ static struct pci_driver yenta_cardbus_d
 	.driver.pm	= YENTA_PM_OPS,
 };
 
-
-static int __init yenta_socket_init(void)
-{
-	return pci_register_driver(&yenta_cardbus_driver);
-}
-
-
-static void __exit yenta_socket_exit(void)
-{
-	pci_unregister_driver(&yenta_cardbus_driver);
-}
-
-
-module_init(yenta_socket_init);
-module_exit(yenta_socket_exit);
+module_pci_driver(yenta_cardbus_driver);
 
 MODULE_LICENSE("GPL");
_



More information about the linux-pcmcia mailing list