Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

watchdog: starfive: check watchdog status before enabling in system resume

System resume will start and enable watchdog regardless of whether the
watchdog is enabled/disabled during a system suspend.
Add a check to the watchdog status and only start and enable the
watchdog if the watchdog status is running/active.

Signed-off-by: Sia Jee Heng <jeeheng.sia@starfivetech.com>
Signed-off-by: Ji Sheng Teoh <jisheng.teoh@starfivetech.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20240130055118.1917086-1-jisheng.teoh@starfivetech.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

authored by

Ji Sheng Teoh and committed by
Wim Van Sebroeck
d869d635 8bc22a2f

+4 -1
+4 -1
drivers/watchdog/starfive-wdt.c
··· 559 559 starfive_wdt_set_reload_count(wdt, wdt->reload); 560 560 starfive_wdt_lock(wdt); 561 561 562 - return starfive_wdt_start(wdt); 562 + if (watchdog_active(&wdt->wdd)) 563 + return starfive_wdt_start(wdt); 564 + 565 + return 0; 563 566 } 564 567 565 568 static int starfive_wdt_runtime_suspend(struct device *dev)