projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
watchdog
/
hpwdt.c
diff --git
a/drivers/watchdog/hpwdt.c
b/drivers/watchdog/hpwdt.c
index ada3e44f99328424d11994ec03ebdd4886f4a919..286369d4f0f50928c4b837eb362a8e0fb5c6fa02 100644
(file)
--- 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;
{
void __user *argp = (void __user *)arg;
int __user *p = argp;
- int new_margin;
+ int new_margin
, options
;
int ret = -ENOTTY;
switch (cmd) {
int ret = -ENOTTY;
switch (cmd) {
@@
-608,6
+608,20
@@
static long hpwdt_ioctl(struct file *file, unsigned int cmd,
ret = 0;
break;
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)
case WDIOC_SETTIMEOUT:
ret = get_user(new_margin, p);
if (ret)