aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Moll <pawel.moll@arm.com>2014-08-12 06:37:52 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 07:58:58 -0400
commit45c19e2a812f9f98c0ad65c8d4a5648b6edcd0f8 (patch)
tree4f56865ffbffd1d94cf2d89c433bf82edd6d7eed
parentca6429d4952398570a3963bd4b5842b519087df8 (diff)
mmc: sdhci-pltfm: Do not use parent as the host's device
The code selecting a device for the sdhci host has been continuously tweaked (4b711cb13843f5082e82970dd1e8031383134a65 "mmc: sdhci-pltfm: Add structure for host-specific data" and a4d2177f00a5252d825236c5124bc1e9918bdb41 "mmc: sdhci-pltfm: dt device does not pass parent to sdhci_alloc_host" while there does not seem to be any reason to use platform device's parent in the first place. The comment saying "Some PCI-based MFD need the parent here" seem to refer to Timberdale FPGA driver (the only MFD driver registering SDHCI cell, drivers/mfd/timberdale.c) but again, the only situation when parent device matter is runtime PM, which is not implemented for Timberdale. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sdhci-pltfm.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
index 7e834fb78f42..c5b01d6bb85d 100644
--- a/drivers/mmc/host/sdhci-pltfm.c
+++ b/drivers/mmc/host/sdhci-pltfm.c
@@ -123,7 +123,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
123 size_t priv_size) 123 size_t priv_size)
124{ 124{
125 struct sdhci_host *host; 125 struct sdhci_host *host;
126 struct device_node *np = pdev->dev.of_node;
127 struct resource *iomem; 126 struct resource *iomem;
128 int ret; 127 int ret;
129 128
@@ -136,13 +135,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
136 if (resource_size(iomem) < 0x100) 135 if (resource_size(iomem) < 0x100)
137 dev_err(&pdev->dev, "Invalid iomem size!\n"); 136 dev_err(&pdev->dev, "Invalid iomem size!\n");
138 137
139 /* Some PCI-based MFD need the parent here */ 138 host = sdhci_alloc_host(&pdev->dev,
140 if (pdev->dev.parent != &platform_bus && !np) 139 sizeof(struct sdhci_pltfm_host) + priv_size);
141 host = sdhci_alloc_host(pdev->dev.parent,
142 sizeof(struct sdhci_pltfm_host) + priv_size);
143 else
144 host = sdhci_alloc_host(&pdev->dev,
145 sizeof(struct sdhci_pltfm_host) + priv_size);
146 140
147 if (IS_ERR(host)) { 141 if (IS_ERR(host)) {
148 ret = PTR_ERR(host); 142 ret = PTR_ERR(host);