diff options
author | James Morris <jmorris@namei.org> | 2009-06-30 01:10:35 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-30 01:10:35 +0200 |
commit | ac7242142b03421c96b0a2f8d99f146d075614c2 (patch) | |
tree | b0b2ead65858c7a343d38affed86fe815e37e7e9 /drivers/rtc/interface.c | |
parent | selinux: clean up avc node cache when disabling selinux (diff) | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiw... (diff) | |
download | linux-ac7242142b03421c96b0a2f8d99f146d075614c2.tar.xz linux-ac7242142b03421c96b0a2f8d99f146d075614c2.zip |
Merge branch 'master' into next
Diffstat (limited to 'drivers/rtc/interface.c')
-rw-r--r-- | drivers/rtc/interface.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 4348c4b0d453..4cdb31a362ca 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -371,19 +371,21 @@ EXPORT_SYMBOL_GPL(rtc_update_irq_enable); * @rtc: the rtc device * @num: how many irqs are being reported (usually one) * @events: mask of RTC_IRQF with one or more of RTC_PF, RTC_AF, RTC_UF - * Context: in_interrupt(), irqs blocked + * Context: any */ void rtc_update_irq(struct rtc_device *rtc, unsigned long num, unsigned long events) { - spin_lock(&rtc->irq_lock); + unsigned long flags; + + spin_lock_irqsave(&rtc->irq_lock, flags); rtc->irq_data = (rtc->irq_data + (num << 8)) | events; - spin_unlock(&rtc->irq_lock); + spin_unlock_irqrestore(&rtc->irq_lock, flags); - spin_lock(&rtc->irq_task_lock); + spin_lock_irqsave(&rtc->irq_task_lock, flags); if (rtc->irq_task) rtc->irq_task->func(rtc->irq_task->private_data); - spin_unlock(&rtc->irq_task_lock); + spin_unlock_irqrestore(&rtc->irq_task_lock, flags); wake_up_interruptible(&rtc->irq_queue); kill_fasync(&rtc->async_queue, SIGIO, POLL_IN); |