summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Walle <[email protected]>2024-12-13 11:23:17 +0100
committerPeng Fan <[email protected]>2024-12-15 09:00:31 +0800
commit781a7c660cee194566d8e21f20c156e40bcea322 (patch)
tree5ddde48f616160130bf042674b86f2fe8fde561c
parent88bd5701efdc48048e030d91c2633048f0f753a0 (diff)
board: sl28: fix linking with disabled watchdog
We don't have a reference to the driver used by uclass_get_device_by_driver() in stop_recovery_watchdog(). Fix it by not calling that function if the watchdog driver isn't enabled. Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Heiko Thiery <[email protected]> Signed-off-by: Peng Fan <[email protected]>
-rw-r--r--board/kontron/sl28/sl28.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c
index adfec8ba237..0baf5c63f18 100644
--- a/board/kontron/sl28/sl28.c
+++ b/board/kontron/sl28/sl28.c
@@ -156,7 +156,8 @@ int fsl_board_late_init(void)
* If the watchdog isn't enabled at reset (which is a configuration
* option) disabling it doesn't hurt either.
*/
- if (!IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART))
+ if (IS_ENABLED(CONFIG_WDT_SL28CPLD) &&
+ !IS_ENABLED(CONFIG_WATCHDOG_AUTOSTART))
stop_recovery_watchdog();
return 0;