Commit 3bd1911b authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] unlocked_ioctl changes
  [WATCHDOG] wdt285: fix sparse warnings
  [WATCHDOG] ibmasr: remove unnecessary spin_unlock()
parents 1910e021 7275fc8c
...@@ -130,8 +130,8 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data, ...@@ -130,8 +130,8 @@ static ssize_t geodewdt_write(struct file *file, const char __user *data,
return len; return len;
} }
static int geodewdt_ioctl(struct inode *inode, struct file *file, static long geodewdt_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int __user *p = argp; int __user *p = argp;
...@@ -198,7 +198,7 @@ static const struct file_operations geodewdt_fops = { ...@@ -198,7 +198,7 @@ static const struct file_operations geodewdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.write = geodewdt_write, .write = geodewdt_write,
.ioctl = geodewdt_ioctl, .unlocked_ioctl = geodewdt_ioctl,
.open = geodewdt_open, .open = geodewdt_open,
.release = geodewdt_release, .release = geodewdt_release,
}; };
......
...@@ -173,8 +173,8 @@ static const struct watchdog_info ident = { ...@@ -173,8 +173,8 @@ static const struct watchdog_info ident = {
.identity = "PNX4008 Watchdog", .identity = "PNX4008 Watchdog",
}; };
static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file, static long pnx4008_wdt_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
int ret = -ENOTTY; int ret = -ENOTTY;
int time; int time;
......
...@@ -182,8 +182,8 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data, ...@@ -182,8 +182,8 @@ static ssize_t rc32434_wdt_write(struct file *file, const char *data,
return 0; return 0;
} }
static int rc32434_wdt_ioctl(struct inode *inode, struct file *file, static long rc32434_wdt_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
int new_timeout; int new_timeout;
...@@ -242,7 +242,7 @@ static struct file_operations rc32434_wdt_fops = { ...@@ -242,7 +242,7 @@ static struct file_operations rc32434_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.write = rc32434_wdt_write, .write = rc32434_wdt_write,
.ioctl = rc32434_wdt_ioctl, .unlocked_ioctl = rc32434_wdt_ioctl,
.open = rc32434_wdt_open, .open = rc32434_wdt_open,
.release = rc32434_wdt_release, .release = rc32434_wdt_release,
}; };
......
...@@ -144,8 +144,8 @@ static int rdc321x_wdt_release(struct inode *inode, struct file *file) ...@@ -144,8 +144,8 @@ static int rdc321x_wdt_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static int rdc321x_wdt_ioctl(struct inode *inode, struct file *file, static long rdc321x_wdt_ioctl(struct file *file, unsigned int cmd,
unsigned int cmd, unsigned long arg) unsigned long arg)
{ {
void __user *argp = (void __user *)arg; void __user *argp = (void __user *)arg;
unsigned int value; unsigned int value;
...@@ -204,7 +204,7 @@ static ssize_t rdc321x_wdt_write(struct file *file, const char __user *buf, ...@@ -204,7 +204,7 @@ static ssize_t rdc321x_wdt_write(struct file *file, const char __user *buf,
static const struct file_operations rdc321x_wdt_fops = { static const struct file_operations rdc321x_wdt_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.llseek = no_llseek, .llseek = no_llseek,
.ioctl = rdc321x_wdt_ioctl, .unlocked_ioctl = rdc321x_wdt_ioctl,
.open = rdc321x_wdt_open, .open = rdc321x_wdt_open,
.write = rdc321x_wdt_write, .write = rdc321x_wdt_write,
.release = rdc321x_wdt_release, .release = rdc321x_wdt_release,
......
...@@ -115,7 +115,7 @@ static int watchdog_release(struct inode *inode, struct file *file) ...@@ -115,7 +115,7 @@ static int watchdog_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static ssize_t watchdog_write(struct file *file, const char *data, static ssize_t watchdog_write(struct file *file, const char __user *data,
size_t len, loff_t *ppos) size_t len, loff_t *ppos)
{ {
/* /*
...@@ -136,18 +136,19 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, ...@@ -136,18 +136,19 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
unsigned long arg) unsigned long arg)
{ {
unsigned int new_margin; unsigned int new_margin;
int __user *int_arg = (int __user *)arg;
int ret = -ENOTTY; int ret = -ENOTTY;
switch (cmd) { switch (cmd) {
case WDIOC_GETSUPPORT: case WDIOC_GETSUPPORT:
ret = 0; ret = 0;
if (copy_to_user((void *)arg, &ident, sizeof(ident))) if (copy_to_user((void __user *)arg, &ident, sizeof(ident)))
ret = -EFAULT; ret = -EFAULT;
break; break;
case WDIOC_GETSTATUS: case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS: case WDIOC_GETBOOTSTATUS:
ret = put_user(0, (int *)arg); ret = put_user(0, int_arg);
break; break;
case WDIOC_KEEPALIVE: case WDIOC_KEEPALIVE:
...@@ -156,7 +157,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, ...@@ -156,7 +157,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
break; break;
case WDIOC_SETTIMEOUT: case WDIOC_SETTIMEOUT:
ret = get_user(new_margin, (int *)arg); ret = get_user(new_margin, int_arg);
if (ret) if (ret)
break; break;
...@@ -171,7 +172,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd, ...@@ -171,7 +172,7 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
watchdog_ping(); watchdog_ping();
/* Fall */ /* Fall */
case WDIOC_GETTIMEOUT: case WDIOC_GETTIMEOUT:
ret = put_user(soft_margin, (int *)arg); ret = put_user(soft_margin, int_arg);
break; break;
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment