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 /arch/m68k | |
parent | 585583d95c5660973bc0cf64add517b040acd8a4 (diff) | |
parent | 85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff) |
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of:
arch/powerpc/Kconfig
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 7 | ||||
-rw-r--r-- | arch/m68k/mvme16x/rtc.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index a812d03879f8..e8ac3f7d72df 100644 --- a/arch/m68k/bvme6000/rtc.c +++ b/arch/m68k/bvme6000/rtc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/smp_lock.h> | ||
13 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
14 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
15 | #include <linux/fcntl.h> | 16 | #include <linux/fcntl.h> |
@@ -140,10 +141,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
140 | 141 | ||
141 | static int rtc_open(struct inode *inode, struct file *file) | 142 | static int rtc_open(struct inode *inode, struct file *file) |
142 | { | 143 | { |
143 | if(rtc_status) | 144 | lock_kernel(); |
145 | if(rtc_status) { | ||
146 | unlock_kernel(); | ||
144 | return -EBUSY; | 147 | return -EBUSY; |
148 | } | ||
145 | 149 | ||
146 | rtc_status = 1; | 150 | rtc_status = 1; |
151 | unlock_kernel(); | ||
147 | return 0; | 152 | return 0; |
148 | } | 153 | } |
149 | 154 | ||
diff --git a/arch/m68k/mvme16x/rtc.c b/arch/m68k/mvme16x/rtc.c index e341387787ab..432a9f13b2ed 100644 --- a/arch/m68k/mvme16x/rtc.c +++ b/arch/m68k/mvme16x/rtc.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/errno.h> | 10 | #include <linux/errno.h> |
11 | #include <linux/miscdevice.h> | 11 | #include <linux/miscdevice.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | #include <linux/smp_lock.h> | ||
13 | #include <linux/ioport.h> | 14 | #include <linux/ioport.h> |
14 | #include <linux/capability.h> | 15 | #include <linux/capability.h> |
15 | #include <linux/fcntl.h> | 16 | #include <linux/fcntl.h> |
@@ -127,11 +128,14 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
127 | 128 | ||
128 | static int rtc_open(struct inode *inode, struct file *file) | 129 | static int rtc_open(struct inode *inode, struct file *file) |
129 | { | 130 | { |
131 | lock_kernel(); | ||
130 | if( !atomic_dec_and_test(&rtc_ready) ) | 132 | if( !atomic_dec_and_test(&rtc_ready) ) |
131 | { | 133 | { |
132 | atomic_inc( &rtc_ready ); | 134 | atomic_inc( &rtc_ready ); |
135 | unlock_kernel(); | ||
133 | return -EBUSY; | 136 | return -EBUSY; |
134 | } | 137 | } |
138 | unlock_kernel(); | ||
135 | 139 | ||
136 | return 0; | 140 | return 0; |
137 | } | 141 | } |