Skip to contentSkip to conversation

mmc: use module_pci_driver

PATCH New Axel Lin 1 participant 1 message Apr 10, 2012

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mmc: use module_pci_driver

This patch converts the drivers in drivers/mmc/host/* to use module_pci_driver() macro which makes the code smaller and a bit simpler.

---
 drivers/mmc/host/dw_mmc-pci.c |   13 +------------
 drivers/mmc/host/sdhci-pci.c  |   19 +------------------
 2 files changed, 2 insertions(+), 30 deletions(-)
drivers/mmc/host/dw_mmc-pci.c +1 -12
index dc0d25a..f5ab03d 100644
@@ -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 <[email protected]>");
drivers/mmc/host/sdhci-pci.c +1 -18
index 69ef0be..baed1f1 100644
@@ -1475,24 +1475,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 <[email protected]>");
 MODULE_DESCRIPTION("Secure Digital Host Controller Interface PCI driver");
Signature · 1 line
1.7.5.4