Message ID | 20170823114136.10919-2-maxime.ripard@free-electrons.com |
---|---|
State | Accepted |
Commit | ead3697d7ec491c055fe546b3a45bcfba45fa022 |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show |
On Wed, Aug 23, 2017 at 7:41 PM, Maxime Ripard <maxime.ripard@free-electrons.com> wrote: > 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 <maxime.ripard@free-electrons.com> Tested-by: Chen-Yu Tsai <wens@csie.org>
On Thu, Aug 24, 2017 at 8:41 AM, Chen-Yu Tsai <wens@csie.org> wrote: > On Wed, Aug 23, 2017 at 7:41 PM, Maxime Ripard > <maxime.ripard@free-electrons.com> wrote: >> 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 <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> thanks!
On Thu, Aug 24, 2017 at 12:20 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote: > On Thu, Aug 24, 2017 at 8:41 AM, Chen-Yu Tsai <wens@csie.org> wrote: >> On Wed, Aug 23, 2017 at 7:41 PM, Maxime Ripard >> <maxime.ripard@free-electrons.com> wrote: >>> 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 <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> Applied to u-boot-sunxi/master thanks!
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 588574fab6a9..30f1f76e9f8c 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -498,7 +498,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
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 <maxime.ripard@free-electrons.com> --- drivers/mmc/sunxi_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)