diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-15 01:44:51 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-15 01:44:51 -0400 |
commit | 43d2548bb2ef7e6d753f91468a746784041e522d (patch) | |
tree | 77d13fcd48fd998393abb825ec36e2b732684a73 /drivers/sbus/char/rtc.c | |
parent | 585583d95c5660973bc0cf64add517b040acd8a4 (diff) | |
parent | 85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff) |
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of:
arch/powerpc/Kconfig
Diffstat (limited to 'drivers/sbus/char/rtc.c')
-rw-r--r-- | drivers/sbus/char/rtc.c | 3 |
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 | } |