diff options
-rw-r--r-- | Documentation/watchdog/watchdog-kernel-api.txt | 7 | ||||
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 1 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt index 9e162465b0cf..7d9d1da762b6 100644 --- a/Documentation/watchdog/watchdog-kernel-api.txt +++ b/Documentation/watchdog/watchdog-kernel-api.txt | |||
@@ -117,9 +117,10 @@ they are supported. These optional routines/operations are: | |||
117 | status of the device is reported with watchdog WDIOF_* status flags/bits. | 117 | status of the device is reported with watchdog WDIOF_* status flags/bits. |
118 | * set_timeout: this routine checks and changes the timeout of the watchdog | 118 | * set_timeout: this routine checks and changes the timeout of the watchdog |
119 | timer device. It returns 0 on success, -EINVAL for "parameter out of range" | 119 | timer device. It returns 0 on success, -EINVAL for "parameter out of range" |
120 | and -EIO for "could not write value to the watchdog". On success the timeout | 120 | and -EIO for "could not write value to the watchdog". On success this |
121 | value of the watchdog_device will be changed to the value that was just used | 121 | routine should set the timeout value of the watchdog_device to the |
122 | to re-program the watchdog timer device. | 122 | achieved timeout value (which may be different from the requested one |
123 | because the watchdog does not necessarily has a 1 second resolution). | ||
123 | (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the | 124 | (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the |
124 | watchdog's info structure). | 125 | watchdog's info structure). |
125 | * ioctl: if this routine is present then it will be called first before we do | 126 | * ioctl: if this routine is present then it will be called first before we do |
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) */ |