Switch to use CONFIG_IS_ENABLED.

Signed-off-by: Peng Fan <peng....@nxp.com>
Cc: Jaehoon Chung <jh80.ch...@samsung.com>
Cc: Stefano Babic <sba...@denx.de>
---
 drivers/mmc/fsl_esdhc.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 3abd2d3..5a1c7aa 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -107,7 +107,7 @@ struct fsl_esdhc_priv {
        int non_removable;
        int wp_enable;
        int vs18_enable;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
        struct gpio_desc cd_gpio;
        struct gpio_desc wp_gpio;
 #endif
@@ -690,10 +690,10 @@ static int esdhc_getcd(struct mmc *mmc)
                return 1;
 #endif
 
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
        if (priv->non_removable)
                return 1;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
        if (dm_gpio_is_valid(&priv->cd_gpio))
                return dm_gpio_get_value(&priv->cd_gpio);
 #endif
@@ -825,7 +825,7 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv)
        return 0;
 }
 
-#ifndef CONFIG_DM_MMC
+#if !CONFIG_IS_ENABLED(DM_MMC)
 static int fsl_esdhc_cfg_to_priv(struct fsl_esdhc_cfg *cfg,
                                 struct fsl_esdhc_priv *priv)
 {
@@ -956,7 +956,7 @@ void fdt_fixup_esdhc(void *blob, bd_t *bd)
 }
 #endif
 
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
 #include <asm/arch/clock.h>
 __weak void init_clk_usdhc(u32 index)
 {
@@ -992,7 +992,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
                priv->non_removable = 1;
         } else {
                priv->non_removable = 0;
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
                gpio_request_by_name_nodev(offset_to_ofnode(node), "cd-gpios",
                                           0, &priv->cd_gpio, GPIOD_IS_IN);
 #endif
@@ -1000,7 +1000,7 @@ static int fsl_esdhc_probe(struct udevice *dev)
 
        priv->wp_enable = 1;
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
        ret = gpio_request_by_name_nodev(offset_to_ofnode(node), "wp-gpios", 0,
                                         &priv->wp_gpio, GPIOD_IS_IN);
        if (ret)
-- 
2.6.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to