diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-08-23 17:46:59 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-08-23 17:46:59 +0200 |
commit | 87ce786ae5f24e336195805a9fc7428a6f922478 (patch) | |
tree | 4e756c5b49dadcd4b9cf46a1a0e3593ccadfb291 /drivers/rtc/rtc-dev.c | |
parent | 8067794bec1cc5de1431102cf0a6a1c7ce75cd85 (diff) | |
parent | f1c5d30e1d79bbfb60eaf189db862d3cb2bcac92 (diff) |
Merge branch 'x86/cpu' into x86/x2apic
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 856cc1af40d..35dcc06eb3e 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; } |