diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-05-11 06:00:27 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2012-05-23 10:26:20 -0400 |
commit | 5f2430f554aabb4810b2a6f906be571ac1241d96 (patch) | |
tree | 061e277f6d580d8d2cb77866669628838b5b3a29 /drivers/watchdog | |
parent | abcf834b80eefb2ded56254ce7de94d2ab258d22 (diff) |
watchdog: s3c2410_wdt: Set timeout to actually achieved timeout
While rebasing my "watchdog_dev: Let the driver update the timeout field on
set_timeout success" patch (before I noticed it was already picked up by Wim),
I noticed that the s3c2410_wdt driver may not always have a 1 second
resolution, this patch changes s3c2410wdt_set_heartbeat to update the
timeout to the actually achieved timeout.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index d277cd614daf..200ece5e2a22 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -202,7 +202,7 @@ static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd, unsigned timeou | |||
202 | writel(count, wdt_base + S3C2410_WTDAT); | 202 | writel(count, wdt_base + S3C2410_WTDAT); |
203 | writel(wtcon, wdt_base + S3C2410_WTCON); | 203 | writel(wtcon, wdt_base + S3C2410_WTCON); |
204 | 204 | ||
205 | wdd->timeout = timeout; | 205 | wdd->timeout = (count * divisor) / freq; |
206 | 206 | ||
207 | return 0; | 207 | return 0; |
208 | } | 208 | } |