[U-Boot] [PATCH] fsl_esdhc: fix warning if CONFIG_DM_REGULATOR is not set

Stefano Babic sbabic at denx.de
Wed Aug 16 11:16:18 UTC 2017


Warning appears when i.MX6 (icore) boards are built.

Signed-off-by: Stefano Babic <sbabic at denx.de>
---
 drivers/mmc/fsl_esdhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 3abd2d3..b98da69 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -968,7 +968,6 @@ static int fsl_esdhc_probe(struct udevice *dev)
 	struct fsl_esdhc_priv *priv = dev_get_priv(dev);
 	const void *fdt = gd->fdt_blob;
 	int node = dev_of_offset(dev);
-	struct udevice *vqmmc_dev;
 	fdt_addr_t addr;
 	unsigned int val;
 	int ret;
@@ -1014,6 +1013,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
 	 * If emmc I/O has a fixed voltage at 1.8V, this must be provided,
 	 * otherwise, emmc will work abnormally.
 	 */
+	struct udevice *vqmmc_dev;
 	ret = device_get_supply_regulator(dev, "vqmmc-supply", &vqmmc_dev);
 	if (ret) {
 		dev_dbg(dev, "no vqmmc-supply\n");
-- 
2.7.4



More information about the U-Boot mailing list