From c36549a00c5eb8ac76c39cc54f7e7d0e7b6a5c87 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 12 Aug 2008 15:08:41 -0700 Subject: [PATCH] --- yaml --- r: 108243 b: refs/heads/master c: b1c3c898274334a9255445ba0636d13eda8399d7 h: refs/heads/master i: 108241: 2386dc0db4cddcd94187c7d094e2d89c671cc66f 108239: 297acbde17ac64cf37a4d4b2059757c685cfa4a7 v: v3 --- [refs] | 2 +- trunk/drivers/rtc/rtc-dev.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 85490747e0c2..4ed2f0aa18b1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9623e078c1f4692a91531af2f639ec8aff8f0472 +refs/heads/master: b1c3c898274334a9255445ba0636d13eda8399d7 diff --git a/trunk/drivers/rtc/rtc-dev.c b/trunk/drivers/rtc/rtc-dev.c index 856cc1af40df..35dcc06eb3e2 100644 --- a/trunk/drivers/rtc/rtc-dev.c +++ b/trunk/drivers/rtc/rtc-dev.c @@ -13,7 +13,6 @@ #include #include -#include #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; }