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 <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
This commit is contained in:
Arnd Bergmann 2010-04-27 00:24:05 +02:00 • committed by Frederic Weisbecker
commit 55929332c9
23 changed files with 280 additions and 115 deletions

View file

@ -100,7 +100,7 @@ const struct file_operations nvram_fops = {
.llseek = nvram_llseek,
.read = read_nvram,
.write = write_nvram,
.ioctl = nvram_ioctl,
.unlocked_ioctl = nvram_ioctl,
};
static struct miscdevice nvram_dev = {

View file

@ -2273,8 +2273,7 @@ static int register_pmu_pm_ops(void)
device_initcall(register_pmu_pm_ops);
#endif
static int
pmu_ioctl(struct inode * inode, struct file *filp,
static int pmu_ioctl(struct file *filp,
u_int cmd, u_long arg)
{
__u32 __user *argp = (__u32 __user *)arg;
@ -2337,11 +2336,23 @@ pmu_ioctl(struct inode * inode, struct file *filp,
return error;
}
static long pmu_unlocked_ioctl(struct file *filp,
u_int cmd, u_long arg)
{
int ret;
lock_kernel();
ret = pmu_ioctl(filp, cmd, arg);
unlock_kernel();
return ret;
}
static const struct file_operations pmu_device_fops = {
.read = pmu_read,
.write = pmu_write,
.poll = pmu_fpoll,
.ioctl = pmu_ioctl,
.unlocked_ioctl = pmu_unlocked_ioctl,
.open = pmu_open,
.release = pmu_release,
};