mmc: dw_mmc-pci: Use module_pci_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Aug 2012 06:29:17 +0000 (11:59 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:30 +0000 (13:58 -0400)
module_pci_driver makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/dw_mmc-pci.c

index dc0d25a013e043f40536a125a63420cfe923595d..f5ab03d32fb9f44c567befaa8d7d45b6de2626b6 100644 (file)
@@ -140,18 +140,7 @@ static struct pci_driver dw_mci_pci_driver = {
        },
 };
 
-static int __init dw_mci_init(void)
-{
-       return pci_register_driver(&dw_mci_pci_driver);
-}
-
-static void __exit dw_mci_exit(void)
-{
-       pci_unregister_driver(&dw_mci_pci_driver);
-}
-
-module_init(dw_mci_init);
-module_exit(dw_mci_exit);
+module_pci_driver(dw_mci_pci_driver);
 
 MODULE_DESCRIPTION("DW Multimedia Card PCI Interface driver");
 MODULE_AUTHOR("Shashidhar Hiremath <shashidharh@vayavyalabs.com>");