---
 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 <mbala...@gmail.com>
Cc: Pavel Andrianov <andria...@ispras.ru>
Cc:Wim Van Sebroeck <w...@linux-watchdog.org> (maintainer:WATCHDOG DEVICE 
DRIVERS)
Cc: Guenter Roeck <li...@roeck-us.net> (maintainer:WATCHDOG DEVICE DRIVERS)
Cc:linux-watch...@vger.kernel.org (open list:WATCHDOG DEVICE DRIVERS)
Cc:linux-kernel@vger.kernel.org (open list)

Reply via email to