aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/time.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
commit43d2548bb2ef7e6d753f91468a746784041e522d (patch)
tree77d13fcd48fd998393abb825ec36e2b732684a73 /arch/sparc64/kernel/time.c
parent585583d95c5660973bc0cf64add517b040acd8a4 (diff)
parent85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff)
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of: arch/powerpc/Kconfig
Diffstat (limited to 'arch/sparc64/kernel/time.c')
-rw-r--r--arch/sparc64/kernel/time.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index e5d238970c7e..bedc4c159b1c 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -11,6 +11,7 @@
11#include <linux/errno.h> 11#include <linux/errno.h>
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/smp_lock.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/param.h> 16#include <linux/param.h>
16#include <linux/string.h> 17#include <linux/string.h>
@@ -1659,10 +1660,14 @@ static int mini_rtc_ioctl(struct inode *inode, struct file *file,
1659 1660
1660static int mini_rtc_open(struct inode *inode, struct file *file) 1661static int mini_rtc_open(struct inode *inode, struct file *file)
1661{ 1662{
1662 if (mini_rtc_status & RTC_IS_OPEN) 1663 lock_kernel();
1664 if (mini_rtc_status & RTC_IS_OPEN) {
1665 unlock_kernel();
1663 return -EBUSY; 1666 return -EBUSY;
1667 }
1664 1668
1665 mini_rtc_status |= RTC_IS_OPEN; 1669 mini_rtc_status |= RTC_IS_OPEN;
1670 unlock_kernel();
1666 1671
1667 return 0; 1672 return 0;
1668} 1673}