From: Simon Glass <sjg@chromium.org>
Date: Fri, 17 Dec 2021 03:59:28 +0000 (-0700)
Subject: fdt: Use if() for fdtcontroladdr check
X-Git-Tag: v2025.01-rc5-pxa1908~1591^2~5^2~11
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/%7B%7B%20%24image.RelPermalink%20%7D%7D?a=commitdiff_plain;h=931511d0897ea1f63102b134733e3a71d3545f64;p=u-boot.git

fdt: Use if() for fdtcontroladdr check

Change this to use if() instead of #if

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 299a2c3a32..659aeffd82 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1634,12 +1634,11 @@ int fdtdec_setup(void)
 	if (ret)
 		return ret;
 # endif
-# ifndef CONFIG_SPL_BUILD
-	/* Allow the early environment to override the fdt address */
-	gd->fdt_blob = map_sysmem
-		(env_get_ulong("fdtcontroladdr", 16,
+	if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+		/* Allow the early environment to override the fdt address */
+		gd->fdt_blob = map_sysmem(env_get_ulong("fdtcontroladdr", 16,
 			       (unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
-# endif
+	}
 
 	if (CONFIG_IS_ENABLED(MULTI_DTB_FIT))
 		setup_multi_dtb_fit();