dm: mmc: intialize dev when probe
authorPeng Fan <van.freenix@gmail.com>
Thu, 11 Aug 2016 06:02:56 +0000 (14:02 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 4 Oct 2016 13:41:01 +0000 (15:41 +0200)
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>
drivers/mmc/fsl_esdhc.c

index 103b32e9cf76e90b5b957c8167575a619f5c60e7..9796d39c65bd00a2cd21b4495815d3c45f20a5e7 100644 (file)
@@ -1010,6 +1010,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
        }
 
        upriv->mmc = priv->mmc;
+       priv->mmc->dev = dev;
 
        return 0;
 }