summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 21:15:49 +0400
committerJonathan Corbet <corbet@lwn.net>2008-06-21 00:05:56 +0400
commit7ccef46320ecd52c4d20c8aad592599df76bb7a1 (patch)
tree59989aa85842fe97dbdbda19b1eff9f25872d2c4
parent514bcc66d4072a221a8dfd341a4006385a441918 (diff)
downloadlinux-7ccef46320ecd52c4d20c8aad592599df76bb7a1.tar.xz
ds1286: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/char/ds1286.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c
index ea35ab2c9909..fb584938c9c3 100644
--- a/drivers/char/ds1286.c
+++ b/drivers/char/ds1286.c
@@ -27,6 +27,7 @@
* option) any later version.
*/
#include <linux/ds1286.h>
+#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
@@ -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;
}