Skip to content

Commit 45c19e2

Browse files
pawelmollUlf Hansson
authored andcommitted
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 (4b711cb "mmc: sdhci-pltfm: Add structure for host-specific data" and a4d2177 "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>
1 parent ca6429d commit 45c19e2

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

‎drivers/mmc/host/sdhci-pltfm.c‎

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
123123
size_t priv_size)
124124
{
125125
struct sdhci_host *host;
126-
struct device_node *np = pdev->dev.of_node;
127126
struct resource *iomem;
128127
int ret;
129128

@@ -136,13 +135,8 @@ struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev,
136135
if (resource_size(iomem) < 0x100)
137136
dev_err(&pdev->dev, "Invalid iomem size!\n");
138137

139-
/* Some PCI-based MFD need the parent here */
140-
if (pdev->dev.parent != &platform_bus && !np)
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);
138+
host = sdhci_alloc_host(&pdev->dev,
139+
sizeof(struct sdhci_pltfm_host) + priv_size);
146140

147141
if (IS_ERR(host)) {
148142
ret = PTR_ERR(host);

0 commit comments

Comments
 (0)