aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
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,