rtc: make rtc_update_irq callable with irqs enabled
The rtc_update_irq() might be called with irqs enabled, if a interrupt handler was registered without IRQF_DISABLED. Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_lock/spin_unlock. Also update kerneldoc and drivers which do extra work to follow the current interface spec, as suggestted by David Brownell. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
575c5807f6
commit
e6229bec25
@@ -499,10 +499,7 @@ static void ds1305_work(struct work_struct *work)
|
||||
if (!test_bit(FLAG_EXITING, &ds1305->flags))
|
||||
enable_irq(spi->irq);
|
||||
|
||||
/* rtc_update_irq() requires an IRQ-disabled context */
|
||||
local_irq_disable();
|
||||
rtc_update_irq(ds1305->rtc, 1, RTC_AF | RTC_IRQF);
|
||||
local_irq_enable();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user