Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63517
b: refs/heads/master
c: 85d5723
h: refs/heads/master
i:
  63515: 29ae6f3
v: v3
  • Loading branch information
Dale Farnsworth authored and Wim Van Sebroeck committed Jul 24, 2007
1 parent 20709e8 commit ef2b0cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 94796f908788b3ea2b6e60e5272f4e26cea3fc22
refs/heads/master: 85d57238d2ff9d95892dd1f266b85d2359d48dcc
11 changes: 10 additions & 1 deletion trunk/drivers/char/watchdog/mv64x60_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int timeout;
int options;
void __user *argp = (void __user *)arg;
static struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT |
Expand All @@ -157,7 +158,15 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,
return -EOPNOTSUPP;

case WDIOC_SETOPTIONS:
return -EOPNOTSUPP;
if (get_user(options, (int __user *)argp))
return -EFAULT;

if (options & WDIOS_DISABLECARD)
mv64x60_wdt_handler_disable();

if (options & WDIOS_ENABLECARD)
mv64x60_wdt_handler_enable();
break;

case WDIOC_KEEPALIVE:
mv64x60_wdt_service();
Expand Down

0 comments on commit ef2b0cc

Please sign in to comment.