aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:16:40 -0400
committerJonathan Corbet <corbet@lwn.net>2008-07-02 17:06:24 -0400
commit5ab0854dd77a520abe7c3b9c7770972fd3e61e90 (patch)
tree40baf08bf8edcd1b2d72d13da3adffe3aa37eafc /drivers/sbus
parent41012735352e72b8a3f95521817dcad1b2986636 (diff)
sbus-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/sbus')
-rw-r--r--drivers/sbus/char/rtc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sbus/char/rtc.c b/drivers/sbus/char/rtc.c
index 18d18f1a114e..b0429917154d 100644
--- a/drivers/sbus/char/rtc.c
+++ b/drivers/sbus/char/rtc.c
@@ -12,6 +12,7 @@
12 */ 12 */
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/smp_lock.h>
15#include <linux/types.h> 16#include <linux/types.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17#include <linux/miscdevice.h> 18#include <linux/miscdevice.h>
@@ -213,6 +214,7 @@ static int rtc_open(struct inode *inode, struct file *file)
213{ 214{
214 int ret; 215 int ret;
215 216
217 lock_kernel();
216 spin_lock_irq(&mostek_lock); 218 spin_lock_irq(&mostek_lock);
217 if (rtc_busy) { 219 if (rtc_busy) {
218 ret = -EBUSY; 220 ret = -EBUSY;
@@ -221,6 +223,7 @@ static int rtc_open(struct inode *inode, struct file *file)
221 ret = 0; 223 ret = 0;
222 } 224 }
223 spin_unlock_irq(&mostek_lock); 225 spin_unlock_irq(&mostek_lock);
226 unlock_kernel();
224 227
225 return ret; 228 return ret;
226} 229}