mmc: sdhci-{pxav2,pxav3}: Use of_match_ptr() macro
authorAxel Lin <axel.lin@ingics.com>
Tue, 5 May 2015 09:11:54 +0000 (17:11 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:53 +0000 (09:06 +0200)
This eliminates having an #ifdef returning NULL for the case
when OF is disabled.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Jisheng Zhang <jszhang@marvell.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pxav2.c
drivers/mmc/host/sdhci-pxav3.c

index f98008b5ea77926726d0fc5bec79abea4829b39a..beffd8615489d73fb80042a2b95855a4c04f14f7 100644 (file)
@@ -252,9 +252,7 @@ static int sdhci_pxav2_remove(struct platform_device *pdev)
 static struct platform_driver sdhci_pxav2_driver = {
        .driver         = {
                .name   = "sdhci-pxav2",
-#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,
index b5103a247bc1b6179373b2a027fda00d30c0ada9..01cb2d309a6a2faf5cabf253ec0c9bdcf74118f0 100644 (file)
@@ -578,9 +578,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),
                .pm     = SDHCI_PXAV3_PMOPS,
        },
        .probe          = sdhci_pxav3_probe,