From: Peng Fan <van.freenix@gmail.com>
Date: Thu, 11 Aug 2016 06:02:56 +0000 (+0800)
Subject: dm: mmc: intialize dev when probe
X-Git-Tag: v2025.01-rc5-pxa1908~8335^2~23
X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=35ae99467dbe9f5674b5cd6fbc9951c0aa8c8269;p=u-boot.git

dm: mmc: intialize dev when probe

Need to initialize mmc->dev when probe, or will met
"dev_get_uclass_priv: null device", when `mmc dev 1`.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 103b32e9cf..9796d39c65 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -1010,6 +1010,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
 	}
 
 	upriv->mmc = priv->mmc;
+	priv->mmc->dev = dev;
 
 	return 0;
 }