Skip to content

Commit

Permalink
watchdog: s3c2410_wdt: Set timeout to actually achieved timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans de Goede authored and Wim Van Sebroeck committed May 23, 2012
1 parent abcf834 commit 5f2430f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/watchdog/s3c2410_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static int s3c2410wdt_set_heartbeat(struct watchdog_device *wdd, unsigned timeou
writel(count, wdt_base + S3C2410_WTDAT);
writel(wtcon, wdt_base + S3C2410_WTCON);

wdd->timeout = timeout;
wdd->timeout = (count * divisor) / freq;

return 0;
}
Expand Down

0 comments on commit 5f2430f

Please sign in to comment.