Skip to contentSkip to conversation

mmc: fsl_esdhc_imx.c: fix compiler warning

PATCH New Heiko Schocher 2 participants 2 messages Jan 15, 2021 – Jan 23, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: fsl_esdhc_imx.c: fix compiler warning

prevent unsued variable compiler warning if
DM_REGULATOR is not set.

---

 drivers/mmc/fsl_esdhc_imx.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mmc/fsl_esdhc_imx.c +2 -0
index f47a095c50f..8ac859797f0 100644
@@ -790,7 +790,9 @@ static int esdhc_set_voltage(struct mmc *mmc)
 {
 	struct fsl_esdhc_priv *priv = dev_get_priv(mmc->dev);
 	struct fsl_esdhc *regs = priv->esdhc_regs;
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	int ret;
+#endif
 
 	priv->signal_voltage = mmc->signal_voltage;
 	switch (mmc->signal_voltage) {
Signature · 1 line
2.25.4
#1 lore raw

PATCH 1/1 mmc: fsl_esdhc_imx.c: fix compiler warning

Quoted 3 lines

prevent unsued variable compiler warning if
DM_REGULATOR is not set.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================