aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/wdt977.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/wdt977.c')
-rw-r--r--drivers/watchdog/wdt977.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/watchdog/wdt977.c b/drivers/watchdog/wdt977.c
index bdc28e522f03..60e28d49ff52 100644
--- a/drivers/watchdog/wdt977.c
+++ b/drivers/watchdog/wdt977.c
@@ -365,9 +365,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
365 uarg.i = (int __user *)arg; 365 uarg.i = (int __user *)arg;
366 366
367 switch (cmd) { 367 switch (cmd) {
368 default:
369 return -ENOTTY;
370
371 case WDIOC_GETSUPPORT: 368 case WDIOC_GETSUPPORT:
372 return copy_to_user(uarg.ident, &ident, 369 return copy_to_user(uarg.ident, &ident,
373 sizeof(ident)) ? -EFAULT : 0; 370 sizeof(ident)) ? -EFAULT : 0;
@@ -379,10 +376,6 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
379 case WDIOC_GETBOOTSTATUS: 376 case WDIOC_GETBOOTSTATUS:
380 return put_user(0, uarg.i); 377 return put_user(0, uarg.i);
381 378
382 case WDIOC_KEEPALIVE:
383 wdt977_keepalive();
384 return 0;
385
386 case WDIOC_SETOPTIONS: 379 case WDIOC_SETOPTIONS:
387 if (get_user(new_options, uarg.i)) 380 if (get_user(new_options, uarg.i))
388 return -EFAULT; 381 return -EFAULT;
@@ -399,6 +392,10 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
399 392
400 return retval; 393 return retval;
401 394
395 case WDIOC_KEEPALIVE:
396 wdt977_keepalive();
397 return 0;
398
402 case WDIOC_SETTIMEOUT: 399 case WDIOC_SETTIMEOUT:
403 if (get_user(new_timeout, uarg.i)) 400 if (get_user(new_timeout, uarg.i))
404 return -EFAULT; 401 return -EFAULT;
@@ -412,6 +409,9 @@ static long wdt977_ioctl(struct file *file, unsigned int cmd,
412 case WDIOC_GETTIMEOUT: 409 case WDIOC_GETTIMEOUT:
413 return put_user(timeout, uarg.i); 410 return put_user(timeout, uarg.i);
414 411
412 default:
413 return -ENOTTY;
414
415 } 415 }
416} 416}
417 417