aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/pc87413_wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/pc87413_wdt.c')
-rw-r--r--drivers/watchdog/pc87413_wdt.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/watchdog/pc87413_wdt.c b/drivers/watchdog/pc87413_wdt.c
index 326f2d2ded3b..5fc7f1349950 100644
--- a/drivers/watchdog/pc87413_wdt.c
+++ b/drivers/watchdog/pc87413_wdt.c
@@ -426,6 +426,21 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,
426 return put_user(pc87413_status(), uarg.i); 426 return put_user(pc87413_status(), uarg.i);
427 case WDIOC_GETBOOTSTATUS: 427 case WDIOC_GETBOOTSTATUS:
428 return put_user(0, uarg.i); 428 return put_user(0, uarg.i);
429 case WDIOC_SETOPTIONS:
430 {
431 int options, retval = -EINVAL;
432 if (get_user(options, uarg.i))
433 return -EFAULT;
434 if (options & WDIOS_DISABLECARD) {
435 pc87413_disable();
436 retval = 0;
437 }
438 if (options & WDIOS_ENABLECARD) {
439 pc87413_enable();
440 retval = 0;
441 }
442 return retval;
443 }
429 case WDIOC_KEEPALIVE: 444 case WDIOC_KEEPALIVE:
430 pc87413_refresh(); 445 pc87413_refresh();
431#ifdef DEBUG 446#ifdef DEBUG
@@ -445,21 +460,6 @@ static long pc87413_ioctl(struct file *file, unsigned int cmd,
445 case WDIOC_GETTIMEOUT: 460 case WDIOC_GETTIMEOUT:
446 new_timeout = timeout * 60; 461 new_timeout = timeout * 60;
447 return put_user(new_timeout, uarg.i); 462 return put_user(new_timeout, uarg.i);
448 case WDIOC_SETOPTIONS:
449 {
450 int options, retval = -EINVAL;
451 if (get_user(options, uarg.i))
452 return -EFAULT;
453 if (options & WDIOS_DISABLECARD) {
454 pc87413_disable();
455 retval = 0;
456 }
457 if (options & WDIOS_ENABLECARD) {
458 pc87413_enable();
459 retval = 0;
460 }
461 return retval;
462 }
463 default: 463 default:
464 return -ENOTTY; 464 return -ENOTTY;
465 } 465 }