diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 01:01:14 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-09-08 01:01:14 -0300 |
commit | e5fd91f1ef340da553f7a79da9540c3db711c937 (patch) | |
tree | b11842027dc6641da63f4bcc524f8678263304a3 /drivers/watchdog/hpwdt.c | |
parent | 2a9b0348e685a63d97486f6749622b61e9e3292f (diff) |
Linux-libre 4.2-gnu
Diffstat (limited to 'drivers/watchdog/hpwdt.c')
-rw-r--r-- | drivers/watchdog/hpwdt.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index ada3e44f9..286369d4f 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c @@ -588,7 +588,7 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd, { void __user *argp = (void __user *)arg; int __user *p = argp; - int new_margin; + int new_margin, options; int ret = -ENOTTY; switch (cmd) { @@ -608,6 +608,20 @@ static long hpwdt_ioctl(struct file *file, unsigned int cmd, ret = 0; break; + case WDIOC_SETOPTIONS: + ret = get_user(options, p); + if (ret) + break; + + if (options & WDIOS_DISABLECARD) + hpwdt_stop(); + + if (options & WDIOS_ENABLECARD) { + hpwdt_start(); + hpwdt_ping(); + } + break; + case WDIOC_SETTIMEOUT: ret = get_user(new_margin, p); if (ret) |