From 78237828a3b20d993670e1beeacb5089d40c5e53 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Mon, 17 Aug 2020 21:27:50 +0300 Subject: [PATCH] board_f: Remove dead code from init_func_i2c Since commit 69153988a6f4 ("i2c: Finish dropping use of CONFIG_I2C_HARD") init_func_i2c is wrapped only by "#if defined(CONFIG_SYS_I2C)". Because of this, the second ifdef within becomes pointless: #if defined(CONFIG_SYS_I2C) static int init_func_i2c(void) #ifdef CONFIG_SYS_I2C ... #else ... #endif } #endif Remove the dead #else preprocessor code. Fixes: 69153988a6f ("i2c: Finish dropping use of CONFIG_I2C_HARD") Signed-off-by: Ovidiu Panait --- common/board_f.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 3932e0c69d..d3444c7edc 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -254,11 +254,7 @@ __weak int dram_init_banksize(void) static int init_func_i2c(void) { puts("I2C: "); -#ifdef CONFIG_SYS_I2C i2c_init_all(); -#else - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); -#endif puts("ready\n"); return 0; } -- 2.39.5