]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/omap_hsmmc.c
mmc: omap_hsmmc: do not embed struct mmc in struct omap_hsmmc_plat
[people/ms/u-boot.git] / drivers / mmc / omap_hsmmc.c
index 02970f29b295787a248e530884fee18cbbdb7b69..e0b679aa2c5746f72aa0c3fb47e4ef114f83f620 100644 (file)
@@ -1858,8 +1858,8 @@ static int omap_hsmmc_ofdata_to_platdata(struct udevice *dev)
 static int omap_hsmmc_bind(struct udevice *dev)
 {
        struct omap_hsmmc_plat *plat = dev_get_platdata(dev);
-
-       return mmc_bind(dev, &plat->mmc, &plat->cfg);
+       plat->mmc = calloc(1, sizeof(struct mmc));
+       return mmc_bind(dev, plat->mmc, &plat->cfg);
 }
 #endif
 static int omap_hsmmc_probe(struct udevice *dev)
@@ -1882,7 +1882,7 @@ static int omap_hsmmc_probe(struct udevice *dev)
 #endif
 
 #ifdef CONFIG_BLK
-       mmc = &plat->mmc;
+       mmc = plat->mmc;
 #else
        mmc = mmc_create(cfg, priv);
        if (mmc == NULL)