From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:59 +0000 (+0200) Subject: hpet: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~59 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=48b81880519274d2a8b3e9919a47d91d05a1c964;p=linux-2.6-omap-h63xx.git hpet: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index e7fb0bca366..fb0a85a1eb3 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -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; }