X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=drivers%2Frtc%2Frtc-dev.c;h=35dcc06eb3e2dab77b16e27881f2b6bd6250c372;hb=9ea319b61613085f501a79cf8d405cb221d084f3;hp=856cc1af40df85efe53805822c62886af0754143;hpb=5cdc98b8f51310f7cca05ad780f18f80dd9571de;p=linux-2.6-omap-h63xx.git 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 #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; }