aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-06-30 21:35:28 -0400
committerShawn Guo <shawn.guo@linaro.org>2011-07-26 21:31:33 -0400
commita4d2177f00a5252d825236c5124bc1e9918bdb41 (patch)
tree3048cb14ad99da349e205346a2034a1699305d03 /drivers/mmc
parent57ed3314e0bfa90ea63c63b8d3038814e9d98a20 (diff)
mmc: sdhci-pltfm: dt device does not pass parent to sdhci_alloc_host
Neither platform based nor dt based device needs to pass the parent to sdhci_alloc_host. There is no difference between platform and dt on this point. The patch makes the change to pass device itself than its parent to sdhci_alloc_host for dt case too. Otherwise the probe function of sdhci based drivers which is shared between platform and dt will fail on dt case. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Chris Ball <cjb@laptop.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 71c0ce1f6db0..6414efeddca0 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -85,6 +85,7 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
85{ 85{
86 struct sdhci_host *host; 86 struct sdhci_host *host;
87 struct sdhci_pltfm_host *pltfm_host; 87 struct sdhci_pltfm_host *pltfm_host;
88 struct device_node *np = pdev->dev.of_node;
88 struct resource *iomem; 89 struct resource *iomem;
89 int ret; 90 int ret;
90 91
@@ -98,7 +99,7 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
98 dev_err(&pdev->dev, "Invalid iomem size!\n"); 99 dev_err(&pdev->dev, "Invalid iomem size!\n");
99 100
100 /* Some PCI-based MFD need the parent here */ 101 /* Some PCI-based MFD need the parent here */
101 if (pdev->dev.parent != &platform_bus) 102 if (pdev->dev.parent != &platform_bus && !np)
102 host = sdhci_alloc_host(pdev->dev.parent, sizeof(*pltfm_host)); 103 host = sdhci_alloc_host(pdev->dev.parent, sizeof(*pltfm_host));
103 else 104 else
104 host = sdhci_alloc_host(&pdev->dev, sizeof(*pltfm_host)); 105 host = sdhci_alloc_host(&pdev->dev, sizeof(*pltfm_host));