aboutsummaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-18 14:05:07 -0700
committerTom Rini <trini@konsulko.com>2023-12-13 11:51:24 -0500
commit813f75d8580c96fe83f3b7a450a981e982429356 (patch)
tree75f646e954cb87172e3d288758541831ad41422d /include/fdt_support.h
parent8eda15bc6a374a963ddf899d99088e40484d5276 (diff)
downloadu-boot-813f75d8580c96fe83f3b7a450a981e982429356.zip
u-boot-813f75d8580c96fe83f3b7a450a981e982429356.tar.gz
u-boot-813f75d8580c96fe83f3b7a450a981e982429356.tar.bz2
fdt: Allow use of fdt_support inside if() statements
Most of the fdt_support.h header file is included only if OF_LIBFDT or OF_CONTROL are enabled. This means that calling functions defined in that file must happen inside an #ifdef This is unnecessary, so reduce the condition to just !USE_HOSTCC Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 2cd8366..feda0d9 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -7,8 +7,7 @@
#ifndef __FDT_SUPPORT_H
#define __FDT_SUPPORT_H
-#if (defined(CONFIG_OF_LIBFDT) || defined(CONFIG_OF_CONTROL)) && \
- !defined(USE_HOSTCC)
+#if !defined(USE_HOSTCC)
#include <asm/u-boot.h>
#include <linux/libfdt.h>
@@ -418,7 +417,7 @@ int fdt_valid(struct fdt_header **blobp);
*/
int fdt_get_cells_len(const void *blob, char *nr_cells_name);
-#endif /* ifdef CONFIG_OF_LIBFDT */
+#endif /* !USE_HOSTCC */
#ifdef USE_HOSTCC
int fdtdec_get_int(const void *blob, int node, const char *prop_name,