]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: fsl_esdhc_imx.c: fix compiler warning
authorHeiko Schocher <hs@denx.de>
Fri, 15 Jan 2021 09:37:09 +0000 (10:37 +0100)
committerStefano Babic <sbabic@denx.de>
Sat, 23 Jan 2021 12:40:29 +0000 (13:40 +0100)
prevent unsued variable compiler warning if
DM_REGULATOR is not set.

Signed-off-by: Heiko Schocher <hs@denx.de>
drivers/mmc/fsl_esdhc_imx.c

index f47a095c50fb38227272c4977dd926fb095c82c6..8ac859797f043095f33ce728c8415c2c86e38a6b 100644 (file)
@@ -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) {