]> git.sur5r.net Git - u-boot/commitdiff
libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
authorVignesh R <vigneshr@ti.com>
Mon, 20 Mar 2017 04:34:38 +0000 (10:04 +0530)
committerSimon Glass <sjg@chromium.org>
Sun, 26 Mar 2017 19:22:58 +0000 (13:22 -0600)
Use CONFIG_IS_ENABLED() macro to check whether OF_TRANSLATE is enabled, so
that code block is compiled irrespective of SPL or U-Boot build
and fdt address translation is used.

Signed-off-by: Vignesh R <vigneshr@ti.com>
lib/fdtdec.c

index 81f47ef2c7f4cf0b6ea6966a9455518fd89c5e89..1edfbf2d39213046ad95e12567d73f28cdcf2820 100644 (file)
@@ -112,7 +112,7 @@ fdt_addr_t fdtdec_get_addr_size_fixed(const void *blob, int node,
                return FDT_ADDR_T_NONE;
        }
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_OF_LIBFDT)
+#if CONFIG_IS_ENABLED(OF_TRANSLATE)
        if (translate)
                addr = fdt_translate_address(blob, node, prop_addr);
        else