drivers: Push down BKL into various drivers
[safe/jmp/linux-2.6] / drivers / char / hpet.c
index 9ded667..a0a1829 100644 (file)
@@ -431,14 +431,18 @@ static int hpet_release(struct inode *inode, struct file *file)
 
 static int hpet_ioctl_common(struct hpet_dev *, int, unsigned long, int);
 
-static int
-hpet_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-          unsigned long arg)
+static long hpet_ioctl(struct file *file, unsigned int cmd,
+                       unsigned long arg)
 {
        struct hpet_dev *devp;
+       int ret;
 
        devp = file->private_data;
-       return hpet_ioctl_common(devp, cmd, arg, 0);
+       lock_kernel();
+       ret = hpet_ioctl_common(devp, cmd, arg, 0);
+       unlock_kernel();
+
+       return ret;
 }
 
 static int hpet_ioctl_ieon(struct hpet_dev *devp)
@@ -654,7 +658,7 @@ static const struct file_operations hpet_fops = {
        .llseek = no_llseek,
        .read = hpet_read,
        .poll = hpet_poll,
-       .ioctl = hpet_ioctl,
+       .unlocked_ioctl = hpet_ioctl,
        .open = hpet_open,
        .release = hpet_release,
        .fasync = hpet_fasync,