diff options
author | Arnd Bergmann <arnd@arndb.de> | 2008-05-20 13:16:03 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 16:05:57 -0400 |
commit | b0e54f7c477ad24fa0d49baed942c5a5909c748b (patch) | |
tree | cf69ed8d72b97079f68303ae9ed4bc686b6f31b3 /drivers/char | |
parent | 6b0ee363b294c3724224909dcb0b80f7dac3dfd6 (diff) |
ip27-rtc: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/ip27-rtc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/ip27-rtc.c b/drivers/char/ip27-rtc.c index 86e6538a77b0..ec9d0443d92c 100644 --- a/drivers/char/ip27-rtc.c +++ b/drivers/char/ip27-rtc.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/bcd.h> | 27 | #include <linux/bcd.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/smp_lock.h> | ||
30 | #include <linux/types.h> | 31 | #include <linux/types.h> |
31 | #include <linux/miscdevice.h> | 32 | #include <linux/miscdevice.h> |
32 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
@@ -163,15 +164,18 @@ static long rtc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
163 | 164 | ||
164 | static int rtc_open(struct inode *inode, struct file *file) | 165 | static int rtc_open(struct inode *inode, struct file *file) |
165 | { | 166 | { |
167 | lock_kernel(); | ||
166 | spin_lock_irq(&rtc_lock); | 168 | spin_lock_irq(&rtc_lock); |
167 | 169 | ||
168 | if (rtc_status & RTC_IS_OPEN) { | 170 | if (rtc_status & RTC_IS_OPEN) { |
169 | spin_unlock_irq(&rtc_lock); | 171 | spin_unlock_irq(&rtc_lock); |
172 | unlock_kernel(); | ||
170 | return -EBUSY; | 173 | return -EBUSY; |
171 | } | 174 | } |
172 | 175 | ||
173 | rtc_status |= RTC_IS_OPEN; | 176 | rtc_status |= RTC_IS_OPEN; |
174 | spin_unlock_irq(&rtc_lock); | 177 | spin_unlock_irq(&rtc_lock); |
178 | unlock_kernel(); | ||
175 | 179 | ||
176 | return 0; | 180 | return 0; |
177 | } | 181 | } |