summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci-esdhc-mcf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sdhci-esdhc-mcf.c')
-rw-r--r--drivers/mmc/host/sdhci-esdhc-mcf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-mcf.c b/drivers/mmc/host/sdhci-esdhc-mcf.c
index ca7a1690b2a8..05926bf5ecf9 100644
--- a/drivers/mmc/host/sdhci-esdhc-mcf.c
+++ b/drivers/mmc/host/sdhci-esdhc-mcf.c
@@ -367,14 +367,14 @@ static int esdhc_mcf_plat_init(struct sdhci_host *host,
struct pltfm_mcf_data *mcf_data)
{
struct mcf_esdhc_platform_data *plat_data;
+ struct device *dev = mmc_dev(host->mmc);
- if (!host->mmc->parent->platform_data) {
- dev_err(mmc_dev(host->mmc), "no platform data!\n");
+ if (!dev->platform_data) {
+ dev_err(dev, "no platform data!\n");
return -EINVAL;
}
- plat_data = (struct mcf_esdhc_platform_data *)
- host->mmc->parent->platform_data;
+ plat_data = (struct mcf_esdhc_platform_data *)dev->platform_data;
/* Card_detect */
switch (plat_data->cd_type) {