aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2011-09-12 05:56:59 -0400
committerWim Van Sebroeck <wim@iguana.be>2012-03-27 14:07:43 -0400
commitb10f7c12e051762b84457f6d38d4b71acbf76a02 (patch)
treeaf001c289eb989fab0198989e4ecdf89d5549a26 /drivers/watchdog
parenta5132cafc0a739107e51494b9054c0066802b8cd (diff)
watchdog: watchdog_dev: Let the driver update the timeout field on set_timeout success
When a set_timeout operation succeeds this does not necessarily mean that the exact timeout requested has been achieved, because the watchdog does not necessarily have a 1 second resolution. So rather then have the core set the timeout member of the watchdog_device struct to the exact requested value, instead the driver should set it to the actually achieved timeout value. 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/watchdog_dev.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 55b1f60b19d2..c6e1b8dd80cc 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -226,7 +226,6 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
226 err = wdd->ops->set_timeout(wdd, val); 226 err = wdd->ops->set_timeout(wdd, val);
227 if (err < 0) 227 if (err < 0)
228 return err; 228 return err;
229 wdd->timeout = val;
230 /* If the watchdog is active then we send a keepalive ping 229 /* If the watchdog is active then we send a keepalive ping
231 * to make sure that the watchdog keep's running (and if 230 * to make sure that the watchdog keep's running (and if
232 * possible that it takes the new timeout) */ 231 * possible that it takes the new timeout) */