From: Ovidiu Panait Date: Sun, 22 Nov 2020 10:35:41 +0200 Subject: [PATCH v2 03/18] common: board_f: Use IS_ENABLED(CONFIG_TIMER_EARLY) in initf_dm In-Reply-To: <20201122083556.6756-1-ovidiu.panait@windriver.com> References: <20201122083556.6756-1-ovidiu.panait@windriver.com> Message-ID: <20201122083556.6756-4-ovidiu.panait@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Reviewed-by: Simon Glass --- v2 updates: - add reviewed-by tag common/board_f.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 552552e328..3c4437341a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -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; -- 2.17.1