[U-Boot] [PATCH] libfdt: use CONFIG_IS_ENABLED for OF_LIBFDT
Vignesh R
vigneshr at ti.com
Mon Feb 13 07:34:26 UTC 2017
Use CONFIG_IS_ENABLED() macro to check whether OF_LIBFDT is enabled, so
that code block is compiled irrespective of SPL or U-Boot build
depending on CONFIG_SPL_OF_LIBFDT(for SPL) or CONFIG_OF_LIBFDT(for
U-Boot).
Signed-off-by: Vignesh R <vigneshr at ti.com>
---
lib/fdtdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 81f47ef2c7f4..269226e0ef15 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -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_LIBFDT)
if (translate)
addr = fdt_translate_address(blob, node, prop_addr);
else
--
2.11.0
More information about the U-Boot
mailing list