mmc: sdhci-pci: Use module_pci_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Aug 2012 06:27:02 +0000 (11:57 +0530)
committerChris Ball <cjb@laptop.org>
Tue, 4 Sep 2012 17:58:29 +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/sdhci-pci.c

index 504da715a41ae30f3e5670ff305801167ee60935..3f0794e53b4a31a1bba24f0116b5d66c15f6bcf6 100644 (file)
@@ -1476,24 +1476,7 @@ static struct pci_driver sdhci_driver = {
        },
 };
 
-/*****************************************************************************\
- *                                                                           *
- * Driver init/exit                                                          *
- *                                                                           *
-\*****************************************************************************/
-
-static int __init sdhci_drv_init(void)
-{
-       return pci_register_driver(&sdhci_driver);
-}
-
-static void __exit sdhci_drv_exit(void)
-{
-       pci_unregister_driver(&sdhci_driver);
-}
-
-module_init(sdhci_drv_init);
-module_exit(sdhci_drv_exit);
+module_pci_driver(sdhci_driver);
 
 MODULE_AUTHOR("Pierre Ossman <pierre@ossman.eu>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface PCI driver");