summaryrefslogtreecommitdiff
path: root/drivers/watchdog/cpwd.c
diff options
context:
space:
mode:
authorWim Van Sebroeck <wim@iguana.be>2009-01-21 14:13:11 +0300
committerWim Van Sebroeck <wim@iguana.be>2009-03-25 11:54:57 +0300
commit9626dd75c57360666f4cdcb660c1672ee9f952e8 (patch)
tree1d746ff1304b7751b9229faa73c9151381f07421 /drivers/watchdog/cpwd.c
parent8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff)
downloadlinux-9626dd75c57360666f4cdcb660c1672ee9f952e8.tar.xz
[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
Switch to unlocked_ioctl Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/cpwd.c')
-rw-r--r--drivers/watchdog/cpwd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 084dfe9cecfb..261790afd65b 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -400,8 +400,7 @@ static int cpwd_release(struct inode *inode, struct file *file)
return 0;
}
-static int cpwd_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long cpwd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
static struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT,
@@ -409,6 +408,7 @@ static int cpwd_ioctl(struct inode *inode, struct file *file,
.identity = DRIVER_NAME,
};
void __user *argp = (void __user *)arg;
+ struct inode *inode = file->f_path.dentry->d_inode;
int index = iminor(inode) - WD0_MINOR;
struct cpwd *p = cpwd_device;
int setopt = 0;
@@ -481,7 +481,7 @@ static long cpwd_compat_ioctl(struct file *file, unsigned int cmd,
case WIOCSTOP:
case WIOCGSTAT:
lock_kernel();
- rval = cpwd_ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
+ rval = cpwd_ioctl(file, cmd, arg);
unlock_kernel();
break;
@@ -515,13 +515,13 @@ static ssize_t cpwd_read(struct file * file, char __user *buffer,
}
static const struct file_operations cpwd_fops = {
- .owner = THIS_MODULE,
- .ioctl = cpwd_ioctl,
- .compat_ioctl = cpwd_compat_ioctl,
- .open = cpwd_open,
- .write = cpwd_write,
- .read = cpwd_read,
- .release = cpwd_release,
+ .owner = THIS_MODULE,
+ .unlocked_ioctl = cpwd_ioctl,
+ .compat_ioctl = cpwd_compat_ioctl,
+ .open = cpwd_open,
+ .write = cpwd_write,
+ .read = cpwd_read,
+ .release = cpwd_release,
};
static int __devinit cpwd_probe(struct of_device *op,