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: 034e226bc7 ("dm: mmc: sunxi: Pass private data around explicitly")
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Tested-by: Chen-Yu Tsai <wens@csie.org>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
master
Maxime Ripard 7 years ago committed by Jagan Teki
parent c9319b3f20
commit ead3697d7e
  1. 2
      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

Loading…
Cancel
Save