[U-Boot] [PATCH 32/48] stm32mp1: board: protect the led function calls

Patrick Delaunay patrick.delaunay at st.com
Tue Jul 30 17:16:40 UTC 2019


Avoid compilation issue when CONFIG_LED is not activated

Signed-off-by: Patrick Delaunay <patrick.delaunay at st.com>
---

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

diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 61a4253..181409c 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -615,7 +615,7 @@ int board_init(void)
 
 	sysconf_init();
 
-	if (IS_ENABLED(CONFIG_LED))
+	if (CONFIG_IS_ENABLED(CONFIG_LED))
 		led_default_state();
 
 	return 0;
@@ -664,7 +664,9 @@ int board_late_init(void)
 
 void board_quiesce_devices(void)
 {
+#ifdef CONFIG_LED
 	setup_led(LEDST_OFF);
+#endif
 }
 
 /* board interface eth init */
-- 
2.7.4



More information about the U-Boot mailing list