Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9424
b: refs/heads/master
c: b2846df
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and Linus Torvalds committed Sep 29, 2005
1 parent 1224928 commit ce58e8a
Show file tree
Hide file tree
Showing 2 changed files with 8 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: ae8aed0314064da3002879fedc2d262c72865a17
refs/heads/master: b2846dfa4aa1bbbf3f9977d67566952d7f621009
14 changes: 7 additions & 7 deletions trunk/drivers/char/watchdog/mv64x60_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ static int mv64x60_wdt_open(struct inode *inode, struct file *file)
mv64x60_wdt_service();
mv64x60_wdt_handler_enable();

nonseekable_open(inode, file);

return 0;
}

Expand All @@ -103,12 +105,9 @@ static int mv64x60_wdt_release(struct inode *inode, struct file *file)
return 0;
}

static ssize_t mv64x60_wdt_write(struct file *file, const char *data,
static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data,
size_t len, loff_t * ppos)
{
if (*ppos != file->f_pos)
return -ESPIPE;

if (len)
mv64x60_wdt_service();

Expand All @@ -119,6 +118,7 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int timeout;
void __user *argp = (void __user *)arg;
static struct watchdog_info info = {
.options = WDIOF_KEEPALIVEPING,
.firmware_version = 0,
Expand All @@ -127,13 +127,13 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,

switch (cmd) {
case WDIOC_GETSUPPORT:
if (copy_to_user((void *)arg, &info, sizeof(info)))
if (copy_to_user(argp, &info, sizeof(info)))
return -EFAULT;
break;

case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
if (put_user(wdt_status, (int *)arg))
if (put_user(wdt_status, (int __user *)argp))
return -EFAULT;
wdt_status &= ~WDIOF_KEEPALIVEPING;
break;
Expand All @@ -154,7 +154,7 @@ static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file,

case WDIOC_GETTIMEOUT:
timeout = mv64x60_wdt_timeout * HZ;
if (put_user(timeout, (int *)arg))
if (put_user(timeout, (int __user *)argp))
return -EFAULT;
break;

Expand Down

0 comments on commit ce58e8a

Please sign in to comment.