Skip to content

Commit

Permalink
[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl
Browse files Browse the repository at this point in the history
Switch to unlocked_ioctl

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
  • Loading branch information
Wim Van Sebroeck committed Mar 25, 2009
1 parent 8e0ee43 commit 9626dd7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
20 changes: 10 additions & 10 deletions drivers/watchdog/cpwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,15 @@ 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,
.firmware_version = 1,
.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;
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down
15 changes: 7 additions & 8 deletions drivers/watchdog/riowd.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ static int riowd_release(struct inode *inode, struct file *filp)
return 0;
}

static int riowd_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
static long riowd_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
static struct watchdog_info info = {
.options = WDIOF_SETTIMEOUT,
Expand Down Expand Up @@ -160,12 +159,12 @@ static ssize_t riowd_write(struct file *file, const char __user *buf, size_t cou
}

static const struct file_operations riowd_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = riowd_ioctl,
.open = riowd_open,
.write = riowd_write,
.release = riowd_release,
.owner = THIS_MODULE,
.llseek = no_llseek,
.unlocked_ioctl = riowd_ioctl,
.open = riowd_open,
.write = riowd_write,
.release = riowd_release,
};

static struct miscdevice riowd_miscdev = {
Expand Down

0 comments on commit 9626dd7

Please sign in to comment.