drivers: Push down BKL into various drivers

These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).

[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
This commit is contained in:
Arnd Bergmann
2010-04-27 00:24:05 +02:00
committed by Frederic Weisbecker
parent 703c631ebb
commit 55929332c9
23 changed files with 280 additions and 115 deletions

View File

@@ -659,7 +659,7 @@ static struct watchdog_info ident = {
.identity = "IPMI"
};
static int ipmi_ioctl(struct inode *inode, struct file *file,
static int ipmi_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
void __user *argp = (void __user *)arg;
@@ -730,6 +730,19 @@ static int ipmi_ioctl(struct inode *inode, struct file *file,
}
}
static long ipmi_unlocked_ioctl(struct file *file,
unsigned int cmd,
unsigned long arg)
{
int ret;
lock_kernel();
ret = ipmi_ioctl(file, cmd, arg);
unlock_kernel();
return ret;
}
static ssize_t ipmi_write(struct file *file,
const char __user *buf,
size_t len,
@@ -880,7 +893,7 @@ static const struct file_operations ipmi_wdog_fops = {
.read = ipmi_read,
.poll = ipmi_poll,
.write = ipmi_write,
.ioctl = ipmi_ioctl,
.unlocked_ioctl = ipmi_unlocked_ioctl,
.open = ipmi_open,
.release = ipmi_close,
.fasync = ipmi_fasync,