diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2009-06-18 19:49:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-19 19:46:05 -0400 |
commit | e6229bec25be4ba00f31dd26e25721cc96c22262 (patch) | |
tree | a27e4c51dd8b9aaeb589a147a22bbd06bde77cf0 /drivers/rtc/rtc-ds1374.c | |
parent | 575c5807f6842422e9fe2432fd48dfcc1d7aef41 (diff) |
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>
Diffstat (limited to 'drivers/rtc/rtc-ds1374.c')
-rw-r--r-- | drivers/rtc/rtc-ds1374.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-ds1374.c b/drivers/rtc/rtc-ds1374.c index 4d32e328f6cd..32b27739ec2a 100644 --- a/drivers/rtc/rtc-ds1374.c +++ b/drivers/rtc/rtc-ds1374.c | |||
@@ -296,12 +296,7 @@ static void ds1374_work(struct work_struct *work) | |||
296 | control &= ~(DS1374_REG_CR_WACE | DS1374_REG_CR_AIE); | 296 | control &= ~(DS1374_REG_CR_WACE | DS1374_REG_CR_AIE); |
297 | i2c_smbus_write_byte_data(client, DS1374_REG_CR, control); | 297 | i2c_smbus_write_byte_data(client, DS1374_REG_CR, control); |
298 | 298 | ||
299 | /* rtc_update_irq() assumes that it is called | ||
300 | * from IRQ-disabled context. | ||
301 | */ | ||
302 | local_irq_disable(); | ||
303 | rtc_update_irq(ds1374->rtc, 1, RTC_AF | RTC_IRQF); | 299 | rtc_update_irq(ds1374->rtc, 1, RTC_AF | RTC_IRQF); |
304 | local_irq_enable(); | ||
305 | } | 300 | } |
306 | 301 | ||
307 | out: | 302 | out: |