aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-26 18:24:05 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-16 23:27:41 -0400
commit55929332c92e5d34d65a8f784604c92677ea3e15 (patch)
tree555e922d470336d07ace32bb564ac5358379a3c4 /drivers/char/hpet.c
parent703c631ebbcadcfd861d01e697fdda7c388fec9a (diff)
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>
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 9ded667625ac..a0a1829d3198 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -431,14 +431,18 @@ static int hpet_release(struct inode *inode, struct file *file)
431 431
432static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int); 432static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
433 433
434static int 434static long hpet_ioctl(struct file *file, unsigned int cmd,
435hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 435 unsigned long arg)
436 unsigned long arg)
437{ 436{
438 struct hpet_dev *devp; 437 struct hpet_dev *devp;
438 int ret;
439 439
440 devp = file->private_data; 440 devp = file->private_data;
441 return hpet_ioctl_common(devp, cmd, arg, 0); 441 lock_kernel();
442 ret = hpet_ioctl_common(devp, cmd, arg, 0);
443 unlock_kernel();
444
445 return ret;
442} 446}
443 447
444static int hpet_ioctl_ieon(struct hpet_dev *devp) 448static int hpet_ioctl_ieon(struct hpet_dev *devp)
@@ -654,7 +658,7 @@ static const struct file_operations hpet_fops = {
654 .llseek = no_llseek, 658 .llseek = no_llseek,
655 .read = hpet_read, 659 .read = hpet_read,
656 .poll = hpet_poll, 660 .poll = hpet_poll,
657 .ioctl = hpet_ioctl, 661 .unlocked_ioctl = hpet_ioctl,
658 .open = hpet_open, 662 .open = hpet_open,
659 .release = hpet_release, 663 .release = hpet_release,
660 .fasync = hpet_fasync, 664 .fasync = hpet_fasync,