diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-08-12 18:08:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-12 19:07:28 -0400 |
commit | b1c3c898274334a9255445ba0636d13eda8399d7 (patch) | |
tree | b8373dcc1fc42420bfb90f5e60289fcee612bef0 /drivers/rtc/rtc-dev.c | |
parent | 9623e078c1f4692a91531af2f639ec8aff8f0472 (diff) |
revert "rtc: cdev lock_kernel() pushdown"
Revert commit 51a776fa7a7997e726d4a478eda0854c6f9143bd ("rtc: cdev
lock_kernel() pushdown"). The RTC framework does not need BKL
protection.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r-- | drivers/rtc/rtc-dev.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 856cc1af40df..35dcc06eb3e2 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/rtc.h> | 15 | #include <linux/rtc.h> |
16 | #include <linux/smp_lock.h> | ||
17 | #include "rtc-core.h" | 16 | #include "rtc-core.h" |
18 | 17 | ||
19 | static dev_t rtc_devt; | 18 | static dev_t rtc_devt; |
@@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file) | |||
27 | struct rtc_device, char_dev); | 26 | struct rtc_device, char_dev); |
28 | const struct rtc_class_ops *ops = rtc->ops; | 27 | const struct rtc_class_ops *ops = rtc->ops; |
29 | 28 | ||
30 | lock_kernel(); | 29 | if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) |
31 | if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { | 30 | return -EBUSY; |
32 | err = -EBUSY; | ||
33 | goto out; | ||
34 | } | ||
35 | 31 | ||
36 | file->private_data = rtc; | 32 | file->private_data = rtc; |
37 | 33 | ||
@@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file) | |||
41 | rtc->irq_data = 0; | 37 | rtc->irq_data = 0; |
42 | spin_unlock_irq(&rtc->irq_lock); | 38 | spin_unlock_irq(&rtc->irq_lock); |
43 | 39 | ||
44 | goto out; | 40 | return 0; |
45 | } | 41 | } |
46 | 42 | ||
47 | /* something has gone wrong */ | 43 | /* something has gone wrong */ |
48 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); | 44 | clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); |
49 | out: | ||
50 | unlock_kernel(); | ||
51 | return err; | 45 | return err; |
52 | } | 46 | } |
53 | 47 | ||