diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:15:42 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 16:05:55 -0400 |
commit | 122bc5eaf81a3870f6cc00d2e5e97f32f92e636b (patch) | |
tree | 71da3dd66fb3438dc01771ca3250b5e279246388 /arch/m68k/bvme6000 | |
parent | 556889a4ae89d5f2adf98cac58ecf9326b0d0297 (diff) |
bvme6000-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/m68k/bvme6000')
-rw-r--r-- | arch/m68k/bvme6000/rtc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/m68k/bvme6000/rtc.c b/arch/m68k/bvme6000/rtc.c index a812d03879f..e8ac3f7d72d 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 | ||