From 782c7cc170c2a847ad2d159431cb996c77d0a860 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:49 +0200 Subject: [PATCH] --- yaml --- r: 100342 b: refs/heads/master c: 7ccef46320ecd52c4d20c8aad592599df76bb7a1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/char/ds1286.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6389f39f430d..4ae5825dafc2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 514bcc66d4072a221a8dfd341a4006385a441918 +refs/heads/master: 7ccef46320ecd52c4d20c8aad592599df76bb7a1 diff --git a/trunk/drivers/char/ds1286.c b/trunk/drivers/char/ds1286.c index ea35ab2c9909..fb584938c9c3 100644 --- a/trunk/drivers/char/ds1286.c +++ b/trunk/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; }