diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-12-01 16:18:56 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-01 16:18:56 -0500 |
commit | c99da91e7a12724127475a85cc7a38214b3504e2 (patch) | |
tree | de0eb3fe32ce58804457963fd133a53bb8fba5b8 /drivers/rtc/interface.c | |
parent | a31e23e15cbb9734c5883a4a7f58d8712d303e0b (diff) | |
parent | 92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c (diff) |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index de0da545c7a..a4f56e95cf9 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -293,7 +293,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) return -EINVAL; /* Cannot register while the char dev is in use */ - if (!(mutex_trylock(&rtc->char_lock))) + if (test_and_set_bit(RTC_DEV_BUSY, &rtc->flags)) return -EBUSY; spin_lock_irq(&rtc->irq_task_lock); @@ -303,7 +303,7 @@ int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task) } spin_unlock_irq(&rtc->irq_task_lock); - mutex_unlock(&rtc->char_lock); + clear_bit(RTC_DEV_BUSY, &rtc->flags); return retval; } |