]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: Use if() for fdtcontroladdr check
authorSimon Glass <sjg@chromium.org>
Fri, 17 Dec 2021 03:59:28 +0000 (20:59 -0700)
committerTom Rini <trini@konsulko.com>
Thu, 23 Dec 2021 15:24:39 +0000 (10:24 -0500)
Change this to use if() instead of #if

Signed-off-by: Simon Glass <sjg@chromium.org>
lib/fdtdec.c

index 299a2c3a32f4bcc8b54b4d30702725f6d075153e..659aeffd82e9bc52f546753c554735fd290e5cb5 100644 (file)
@@ -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();