colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / drivers / gpio / omap_gpio.c
index 555eba26622e81a7ea1201522fea4460607db266..4249850f4bf96826bfd4c4f77be3164e8d2673e9 100644 (file)
@@ -30,7 +30,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #define OMAP_GPIO_DIR_OUT      0
 #define OMAP_GPIO_DIR_IN       1
 
-#ifdef CONFIG_DM_GPIO
+#if CONFIG_IS_ENABLED(DM_GPIO)
 
 #define GPIO_PER_BANK                  32
 
@@ -121,7 +121,7 @@ static int _get_gpio_value(const struct gpio_bank *bank, int gpio)
        return (__raw_readl(reg) & (1 << gpio)) != 0;
 }
 
-#ifndef CONFIG_DM_GPIO
+#if !CONFIG_IS_ENABLED(DM_GPIO)
 
 static inline const struct gpio_bank *get_gpio_bank(int gpio)
 {
@@ -372,7 +372,9 @@ U_BOOT_DRIVER(gpio_omap) = {
        .ops    = &gpio_omap_ops,
        .probe  = omap_gpio_probe,
        .priv_auto_alloc_size = sizeof(struct gpio_bank),
+#if !CONFIG_IS_ENABLED(OF_CONTROL)
        .flags = DM_FLAG_PRE_RELOC,
+#endif
 };
 
-#endif /* CONFIG_DM_GPIO */
+#endif /* !DM_GPIO */