[PATCH v1 21/24] gateworks: venice: surround call of setup_fec with if IS_ENABLED(CONFIG_NET)

Troy Kisky troykiskyboundary at gmail.com
Wed Feb 22 02:38:18 CET 2023


This is the same as the definition is surrounded by.
It avoids an error in converting to CONFIG_IS_ENABLED(NET).

Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
---

 board/gateworks/venice/venice.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c
index c4d86c26a9b..ad27835caaf 100644
--- a/board/gateworks/venice/venice.c
+++ b/board/gateworks/venice/venice.c
@@ -41,7 +41,7 @@ int board_fit_config_name_match(const char *name)
 	return -1;
 }
 
-#if (IS_ENABLED(CONFIG_NET))
+#if IS_ENABLED(CONFIG_NET)
 static int setup_fec(void)
 {
 	struct iomuxc_gpr_base_regs *gpr =
@@ -113,10 +113,12 @@ int board_init(void)
 {
 	venice_eeprom_init(1);
 
+#if IS_ENABLED(CONFIG_NET)
 	if (IS_ENABLED(CONFIG_FEC_MXC))
 		setup_fec();
 	if (IS_ENABLED(CONFIG_DWC_ETH_QOS))
 		setup_eqos();
+#endif
 
 	return 0;
 }
-- 
2.34.1



More information about the U-Boot mailing list