diff options
Diffstat (limited to 'drivers/watchdog/w83697hf_wdt.c')
-rw-r--r-- | drivers/watchdog/w83697hf_wdt.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/w83697hf_wdt.c b/drivers/watchdog/w83697hf_wdt.c index 06ddd38675bd..12bd6618ed5e 100644 --- a/drivers/watchdog/w83697hf_wdt.c +++ b/drivers/watchdog/w83697hf_wdt.c | |||
@@ -251,21 +251,6 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
251 | case WDIOC_GETBOOTSTATUS: | 251 | case WDIOC_GETBOOTSTATUS: |
252 | return put_user(0, p); | 252 | return put_user(0, p); |
253 | 253 | ||
254 | case WDIOC_KEEPALIVE: | ||
255 | wdt_ping(); | ||
256 | break; | ||
257 | |||
258 | case WDIOC_SETTIMEOUT: | ||
259 | if (get_user(new_timeout, p)) | ||
260 | return -EFAULT; | ||
261 | if (wdt_set_heartbeat(new_timeout)) | ||
262 | return -EINVAL; | ||
263 | wdt_ping(); | ||
264 | /* Fall */ | ||
265 | |||
266 | case WDIOC_GETTIMEOUT: | ||
267 | return put_user(timeout, p); | ||
268 | |||
269 | case WDIOC_SETOPTIONS: | 254 | case WDIOC_SETOPTIONS: |
270 | { | 255 | { |
271 | int options, retval = -EINVAL; | 256 | int options, retval = -EINVAL; |
@@ -286,6 +271,21 @@ static long wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
286 | return retval; | 271 | return retval; |
287 | } | 272 | } |
288 | 273 | ||
274 | case WDIOC_KEEPALIVE: | ||
275 | wdt_ping(); | ||
276 | break; | ||
277 | |||
278 | case WDIOC_SETTIMEOUT: | ||
279 | if (get_user(new_timeout, p)) | ||
280 | return -EFAULT; | ||
281 | if (wdt_set_heartbeat(new_timeout)) | ||
282 | return -EINVAL; | ||
283 | wdt_ping(); | ||
284 | /* Fall */ | ||
285 | |||
286 | case WDIOC_GETTIMEOUT: | ||
287 | return put_user(timeout, p); | ||
288 | |||
289 | default: | 289 | default: |
290 | return -ENOTTY; | 290 | return -ENOTTY; |
291 | } | 291 | } |