Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109957
b: refs/heads/master
c: edf86c9
h: refs/heads/master
i:
  109955: 1a2b4ab
v: v3
  • Loading branch information
Ben Dooks authored and Wim Van Sebroeck committed Sep 23, 2008
1 parent 989ef49 commit 368e828
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: 7f605ac00416d763c2d9681e378a75e7adbb06e8
refs/heads/master: edf86c9b98b5162bed64a70f9424bd2dd58a717e
15 changes: 8 additions & 7 deletions trunk/drivers/watchdog/wdt285.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ static int watchdog_release(struct inode *inode, struct file *file)
return 0;
}

static ssize_t watchdog_write(struct file *file, const char *data,
size_t len, loff_t *ppos)
static ssize_t watchdog_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos)
{
/*
* Refresh the timer.
Expand All @@ -133,21 +133,22 @@ static const struct watchdog_info ident = {
};

static long watchdog_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
unsigned long arg)
{
unsigned int new_margin;
int __user *int_arg = (int __user *)arg;
int ret = -ENOTTY;

switch (cmd) {
case WDIOC_GETSUPPORT:
ret = 0;
if (copy_to_user((void *)arg, &ident, sizeof(ident)))
if (copy_to_user((void __user *)arg, &ident, sizeof(ident)))
ret = -EFAULT;
break;

case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
ret = put_user(0, (int *)arg);
ret = put_user(0, int_arg);
break;

case WDIOC_KEEPALIVE:
Expand All @@ -156,7 +157,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
break;

case WDIOC_SETTIMEOUT:
ret = get_user(new_margin, (int *)arg);
ret = get_user(new_margin, int_arg);
if (ret)
break;

Expand All @@ -171,7 +172,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
watchdog_ping();
/* Fall */
case WDIOC_GETTIMEOUT:
ret = put_user(soft_margin, (int *)arg);
ret = put_user(soft_margin, int_arg);
break;
}
return ret;
Expand Down

0 comments on commit 368e828

Please sign in to comment.