[U-Boot] [PATCH 20/21] dm: mmc: intialize dev when probe

Peng Fan van.freenix at gmail.com
Thu Aug 11 08:02:56 CEST 2016


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 at nxp.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Simon Glass <sjg at chromium.org>
Cc: Jaehoon Chung <jh80.chung at samsung.com>
---
 drivers/mmc/fsl_esdhc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 103b32e..9796d39 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;
 }
-- 
2.6.2



More information about the U-Boot mailing list