Skip to contentSkip to conversation

mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro

PATCH New Axel Lin 1 participant 1 message Mar 20, 2013

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro

This eliminates having an #ifdef returning NULL for the case when OF is disabled.

---
 drivers/mmc/host/sdhci-pxav2.c |    4 +---
 drivers/mmc/host/sdhci-pxav3.c |    4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/mmc/host/sdhci-pxav2.c +1 -3
index eeb7d43..d57c047 100644
@@ -262,9 +262,7 @@ static struct platform_driver sdhci_pxav2_driver = {
 	.driver		= {
 		.name	= "sdhci-pxav2",
 		.owner	= THIS_MODULE,
-#ifdef CONFIG_OF
-		.of_match_table = sdhci_pxav2_of_match,
-#endif
+		.of_match_table = of_match_ptr(sdhci_pxav2_of_match),
 		.pm	= SDHCI_PLTFM_PMOPS,
 	},
 	.probe		= sdhci_pxav2_probe,
drivers/mmc/host/sdhci-pxav3.c +1 -3
index a0cdbc5..bbadfbd 100644
@@ -439,9 +439,7 @@ static const struct dev_pm_ops sdhci_pxav3_pmops = {
 static struct platform_driver sdhci_pxav3_driver = {
 	.driver		= {
 		.name	= "sdhci-pxav3",
-#ifdef CONFIG_OF
-		.of_match_table = sdhci_pxav3_of_match,
-#endif
+		.of_match_table = of_match_ptr(sdhci_pxav3_of_match),
 		.owner	= THIS_MODULE,
 		.pm	= SDHCI_PXAV3_PMOPS,
 	},
Signature · 1 line
1.7.9.5