Skip to contentSkip to conversation

fsl_esdhc: fix warning if CONFIG_DM_REGULATOR is not set

PATCH New Stefano Babic 2 participants 2 messages Aug 16, 2017 – Aug 18, 2017 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fsl_esdhc: fix warning if CONFIG_DM_REGULATOR is not set

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

---
 drivers/mmc/fsl_esdhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/fsl_esdhc.c +1 -1
index 3abd2d3..b98da69 100644
@@ -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");
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 fsl_esdhc: fix warning if CONFIG_DM_REGULATOR is not set

Hi Stefano.

Quoted 1 line · Stefano Babic

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

ommit 9bb272e90acf7182311dc524df69b125eac92a53

Author: York Sun <[email protected]>
Date:   Tue Aug 8 15:45:13 2017 -0700

driver: mmc: fsl_esdhc: Fix compiling warning

Commit 4483b7eb added variable vqmmc_dev but only uses it under CONFIG_DM_REGULATOR. Add the same macro to variable declaration to get rid of compiling warning.

It seems that already fixed this issue.

Best Regards,
Jaehoon Chung

Quoted 27 lines
---
 drivers/mmc/fsl_esdhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/fsl_esdhc.c +1 -1
index 3abd2d3..b98da69 100644
@@ -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");