From: Maxime Ripard Date: Wed, 23 Aug 2017 11:41:33 +0000 (+0200) Subject: mmc: sunxi: fix legacy MMC initialisation X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=ead3697d7ec491c055fe546b3a45bcfba45fa022;p=u-boot.git mmc: sunxi: fix legacy MMC initialisation The driver-model rework changed, among other things, the way the private data were moved around. It now uses the private field in the struct mmc. However, the mmc_create argument was changed in the process to always pass the array we used to have to store our private structures. The basically means that all the MMC driver instances will now have the private data of the first instance, which obviously doesn't work very well. Pass the proper pointer to mmc_create. Fixes: 034e226bc77e ("dm: mmc: sunxi: Pass private data around explicitly") Signed-off-by: Maxime Ripard Tested-by: Chen-Yu Tsai Tested-by: Jagan Teki Reviewed-by: Jagan Teki --- diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index bc638ae2e6..a76e763bfd 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -519,7 +519,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) if (ret) return NULL; - return mmc_create(cfg, mmc_host); + return mmc_create(cfg, priv); } #else