From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:49 +0000 (+0200) Subject: ds1286: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~67 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7ccef46320ecd52c4d20c8aad592599df76bb7a1;p=linux-2.6-omap-h63xx.git ds1286: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c index ea35ab2c990..fb584938c9c 100644 --- a/drivers/char/ds1286.c +++ b/drivers/char/ds1286.c @@ -27,6 +27,7 @@ * option) any later version. */ #include +#include #include #include #include @@ -252,6 +253,7 @@ static int ds1286_ioctl(struct inode *inode, struct file *file, static int ds1286_open(struct inode *inode, struct file *file) { + lock_kernel(); spin_lock_irq(&ds1286_lock); if (ds1286_status & RTC_IS_OPEN) @@ -260,10 +262,12 @@ static int ds1286_open(struct inode *inode, struct file *file) ds1286_status |= RTC_IS_OPEN; spin_unlock_irq(&ds1286_lock); + unlock_kernel(); return 0; out_busy: spin_lock_irq(&ds1286_lock); + unlock_kernel(); return -EBUSY; }