diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-08-12 15:08:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-12 16:07:28 -0700 |
commit | b1c3c898274334a9255445ba0636d13eda8399d7 (patch) | |
tree | b8373dcc1fc42420bfb90f5e60289fcee612bef0 /drivers/rtc/rtc-dev.c | |
parent | 9623e078c1f4692a91531af2f639ec8aff8f0472 (diff) | |
download | blackbird-op-linux-b1c3c898274334a9255445ba0636d13eda8399d7.tar.gz blackbird-op-linux-b1c3c898274334a9255445ba0636d13eda8399d7.zip |
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 @@ #include <linux/module.h> #include <linux/rtc.h> -#include <linux/smp_lock.h> #include "rtc-core.h" static dev_t rtc_devt; @@ -27,11 +26,8 @@ static int rtc_dev_open(struct inode *inode, struct file *file) struct rtc_device, char_dev); const struct rtc_class_ops *ops = rtc->ops; - lock_kernel(); - if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { - err = -EBUSY; - goto out; - } + if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) + return -EBUSY; file->private_data = rtc; @@ -41,13 +37,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file) rtc->irq_data = 0; spin_unlock_irq(&rtc->irq_lock); - goto out; + return 0; } /* something has gone wrong */ clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); -out: - unlock_kernel(); return err; } |