diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 19:15:59 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:05:57 -0600 |
commit | 48b81880519274d2a8b3e9919a47d91d05a1c964 (patch) | |
tree | 6da458b2ca35a393ccbda7ef7eed39fa5a37f1f2 | |
parent | 986f8b8ccf4806c1e95528a6f157998113fb4f41 (diff) | |
download | linux-48b81880519274d2a8b3e9919a47d91d05a1c964.tar.bz2 |
hpet: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r-- | drivers/char/hpet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index e7fb0bca3667..fb0a85a1eb36 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -14,6 +14,7 @@ #include <linux/interrupt.h> #include <linux/module.h> #include <linux/kernel.h> +#include <linux/smp_lock.h> #include <linux/types.h> #include <linux/miscdevice.h> #include <linux/major.h> @@ -193,6 +194,7 @@ 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) @@ -207,6 +209,7 @@ static int hpet_open(struct inode *inode, struct file *file) if (!devp) { spin_unlock_irq(&hpet_lock); + unlock_kernel(); return -EBUSY; } @@ -214,6 +217,7 @@ 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; } |