summaryrefslogtreecommitdiff
path: root/drivers/watchdog/via_wdt.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2012-02-29 23:20:58 +0400
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 22:08:09 +0400
commit0197c1c49ef1ff386b2ebb6d3b0fc85a8e174b5c (patch)
tree266ad74d44c332e27eac61070f7287051035136f /drivers/watchdog/via_wdt.c
parentb10f7c12e051762b84457f6d38d4b71acbf76a02 (diff)
downloadlinux-0197c1c49ef1ff386b2ebb6d3b0fc85a8e174b5c.tar.xz
watchdog: fix set_timeout operations
Since we changed the behaviour of the set_timeout operation in the watchdog API, we need to change the allready converted drivers so that they update the timeout field at the end of the set_timeout operation. Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/via_wdt.c')
-rw-r--r--drivers/watchdog/via_wdt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c
index ef83f0242411..465e08273c97 100644
--- a/drivers/watchdog/via_wdt.c
+++ b/drivers/watchdog/via_wdt.c
@@ -101,7 +101,7 @@ static void wdt_timer_tick(unsigned long data)
static int wdt_ping(struct watchdog_device *wdd)
{
/* calculate when the next userspace timeout will be */
- next_heartbeat = jiffies + timeout * HZ;
+ next_heartbeat = jiffies + wdd->timeout * HZ;
return 0;
}
@@ -109,7 +109,7 @@ static int wdt_start(struct watchdog_device *wdd)
{
unsigned int ctl = readl(wdt_mem);
- writel(timeout, wdt_mem + VIA_WDT_COUNT);
+ writel(wdd->timeout, wdt_mem + VIA_WDT_COUNT);
writel(ctl | VIA_WDT_RUNNING | VIA_WDT_TRIGGER, wdt_mem);
wdt_ping(wdd);
mod_timer(&timer, jiffies + WDT_HEARTBEAT);
@@ -128,7 +128,7 @@ static int wdt_set_timeout(struct watchdog_device *wdd,
unsigned int new_timeout)
{
writel(new_timeout, wdt_mem + VIA_WDT_COUNT);
- timeout = new_timeout;
+ wdd->timeout = new_timeout;
return 0;
}