]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: board_f: Use IS_ENABLED(CONFIG_TIMER_EARLY) in initf_dm
authorOvidiu Panait <ovidiu.panait@windriver.com>
Sat, 28 Nov 2020 08:43:05 +0000 (10:43 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 15 Jan 2021 19:36:11 +0000 (14:36 -0500)
Use IS_ENABLED(CONFIG_TIMER_EARLY) instead of #ifdef in initf_dm. Also,
move timer code to the main ifdef, so that ret is defined.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/board_f.c

index 552552e3280f7902e9199f027fbbf4245e612fb3..3c4437341a90fe1adde1ce141d3033a918377e7f 100644 (file)
@@ -775,11 +775,12 @@ static int initf_dm(void)
        bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_F);
        if (ret)
                return ret;
-#endif
-#ifdef CONFIG_TIMER_EARLY
-       ret = dm_timer_init();
-       if (ret)
-               return ret;
+
+       if (IS_ENABLED(CONFIG_TIMER_EARLY)) {
+               ret = dm_timer_init();
+               if (ret)
+                       return ret;
+       }
 #endif
 
        return 0;