---
drivers/watchdog/alim1535_wdt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/alim1535_wdt.c b/drivers/watchdog/alim1535_wdt.c
index 60f0c2eb..4ba2b860 100644
--- a/drivers/watchdog/alim1535_wdt.c
+++ b/drivers/watchdog/alim1535_wdt.c
@@ -107,6 +107,7 @@ static void ali_keepalive(void)
static int ali_settimer(int t)
{
+ spin_lock(&ali_lock);
if (t < 0)
return -EINVAL;
else if (t < 60)
@@ -117,7 +118,7 @@ static int ali_settimer(int t)
ali_timeout_bits = (t / 300)|(1 << 6)|(1 << 7);
else
return -EINVAL;
-
+ spin_unlock(&ali_lock);
timeout = t;
return 0;
}
--
2.17.1
Signed-off-by: Mark Balantzyan <[email protected]>
Cc: Pavel Andrianov <[email protected]>
Cc:Wim Van Sebroeck <[email protected]> (maintainer:WATCHDOG DEVICE
DRIVERS)
Cc: Guenter Roeck <[email protected]> (maintainer:WATCHDOG DEVICE DRIVERS)
Cc:[email protected] (open list:WATCHDOG DEVICE DRIVERS)
Cc:[email protected] (open list)