diff options
Diffstat (limited to 'drivers/watchdog/bfin_wdt.c')
-rw-r--r-- | drivers/watchdog/bfin_wdt.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/watchdog/bfin_wdt.c b/drivers/watchdog/bfin_wdt.c index 8f6e871b3fe3..31b42253054e 100644 --- a/drivers/watchdog/bfin_wdt.c +++ b/drivers/watchdog/bfin_wdt.c | |||
@@ -265,20 +265,6 @@ static long bfin_wdt_ioctl(struct file *file, | |||
265 | case WDIOC_GETSTATUS: | 265 | case WDIOC_GETSTATUS: |
266 | case WDIOC_GETBOOTSTATUS: | 266 | case WDIOC_GETBOOTSTATUS: |
267 | return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p); | 267 | return put_user(!!(_bfin_swrst & SWRST_RESET_WDOG), p); |
268 | case WDIOC_KEEPALIVE: | ||
269 | bfin_wdt_keepalive(); | ||
270 | return 0; | ||
271 | case WDIOC_SETTIMEOUT: { | ||
272 | int new_timeout; | ||
273 | |||
274 | if (get_user(new_timeout, p)) | ||
275 | return -EFAULT; | ||
276 | if (bfin_wdt_set_timeout(new_timeout)) | ||
277 | return -EINVAL; | ||
278 | } | ||
279 | /* Fall */ | ||
280 | case WDIOC_GETTIMEOUT: | ||
281 | return put_user(timeout, p); | ||
282 | case WDIOC_SETOPTIONS: { | 268 | case WDIOC_SETOPTIONS: { |
283 | unsigned long flags; | 269 | unsigned long flags; |
284 | int options, ret = -EINVAL; | 270 | int options, ret = -EINVAL; |
@@ -298,6 +284,20 @@ static long bfin_wdt_ioctl(struct file *file, | |||
298 | spin_unlock_irqrestore(&bfin_wdt_spinlock, flags); | 284 | spin_unlock_irqrestore(&bfin_wdt_spinlock, flags); |
299 | return ret; | 285 | return ret; |
300 | } | 286 | } |
287 | case WDIOC_KEEPALIVE: | ||
288 | bfin_wdt_keepalive(); | ||
289 | return 0; | ||
290 | case WDIOC_SETTIMEOUT: { | ||
291 | int new_timeout; | ||
292 | |||
293 | if (get_user(new_timeout, p)) | ||
294 | return -EFAULT; | ||
295 | if (bfin_wdt_set_timeout(new_timeout)) | ||
296 | return -EINVAL; | ||
297 | } | ||
298 | /* Fall */ | ||
299 | case WDIOC_GETTIMEOUT: | ||
300 | return put_user(timeout, p); | ||
301 | default: | 301 | default: |
302 | return -ENOTTY; | 302 | return -ENOTTY; |
303 | } | 303 | } |