Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9626dd75 authored by Wim Van Sebroeck's avatar Wim Van Sebroeck
Browse files

[WATCHDOG] cpwd.c & riowd.c - unlocked_ioctl



Switch to unlocked_ioctl

Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 8e0ee43b
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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;

@@ -516,7 +516,7 @@ static ssize_t cpwd_read(struct file * file, char __user *buffer,

static const struct file_operations cpwd_fops = {
	.owner =		THIS_MODULE,
	.ioctl =	cpwd_ioctl,
	.unlocked_ioctl =	cpwd_ioctl,
	.compat_ioctl =		cpwd_compat_ioctl,
	.open =			cpwd_open,
	.write =		cpwd_write,
+7 −8
Original line number Diff line number Diff line
@@ -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,
@@ -162,7 +161,7 @@ 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,
	.unlocked_ioctl =	riowd_ioctl,
	.open =			riowd_open,
	.write =		riowd_write,
	.release =		riowd_release,