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]>
* 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;