HPET: Remove the BKL.
PATCH 1/1 HPET: Remove the BKL.
Concurrent access is protected by the spin lock hpet_lock. The BKL is not required.
Signed-off-by David John <[email protected]>
--- drivers/char/hpet.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/char/hpet.c +1 -4
@@ -194,7 +194,6 @@ static int hpet_open(struct inode *inode, struct file *file)if (file->f_mode &FMODE_WRITE )return -EINVAL ; -lock_kernel ();spin_lock_irq (&hpet_lock);for (devp =NULL , hpetp = hpets; hpetp && !devp; hpetp = hpetp->hp_next)
@@ -209,7 +208,6 @@ static int hpet_open(struct inode *inode, struct file *file)if (!devp) {spin_unlock_irq (&hpet_lock); -unlock_kernel ();return -EBUSY ; }
@@ -217,7 +215,6 @@ static int hpet_open(struct inode *inode, struct file *file) devp->hd_irqdata =0 ; devp->hd_flags |=HPET_OPEN ;spin_unlock_irq (&hpet_lock); -unlock_kernel ();return 0 ; }
@@ -586,7 +583,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,
drivers/char/hpet.c static const struct file_operations hpet_fops = { · line 586
Quoted 6 lines · David John
drivers/char/hpet.c +1
-1@@ -586,7 +583,7 @@ static const struct file_operations hpet_fops = { .llseek = no_llseek, .read = hpet_read, .poll = hpet_poll, - .ioctl = hpet_ioctl, + .unlocked_ioctl = hpet_ioctl,
Did this actually compile without warning? unlocked_ioctl has a different prototype than ioctl
-Andi
Signature · 1 line
[email protected]
Quoted 10 lines · Andi Kleen
drivers/char/hpet.c static const struct file_operations hpet_fops = { · line 586
Quoted 6 lines · David John
drivers/char/hpet.c +1
-1@@ -586,7 +583,7 @@ static const struct file_operations hpet_fops = { .llseek = no_llseek, .read = hpet_read, .poll = hpet_poll, - .ioctl = hpet_ioctl, + .unlocked_ioctl = hpet_ioctl,Did this actually compile without warning?
unlocked_ioctlhas a different prototype than ioctl
Quoted 2 lines
-Andi
Argg. I didn't check. :-[. Incidentally, this seems to have been done by Alan here: http://lkml.org/lkml/2008/5/22/350. Was the patch dropped later?
CC'd: Alan Cox
David.