aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-twl.c
diff options
context:
space:
mode:
authorVenu Byravarasu <vbyravarasu@nvidia.com>2012-03-23 18:02:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-23 19:58:39 -0400
commit2778ebcc09c002cccdbd6b5509b5cbf4161b486d (patch)
tree096e1d6fe478c88db9d8cecf0e24c0d6fe4c73bb /drivers/rtc/rtc-twl.c
parent94a339d016e26f96a1bd9e08306c857825c91a66 (diff)
drivers/rtc/rtc-twl.c: return correct RTC event from ISR
Following changes are made as part of this change: 1. As TWL RTC supports periodic interrupt, the correct event should be RTC_PF instead of RTC_UF. 2. No need to initialize variable "events" to 0 & then OR it with the event values. Hence fixing it. Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-twl.c')
-rw-r--r--drivers/rtc/rtc-twl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index cedb6c145fc4..4c2c6df2a9ef 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -365,7 +365,7 @@ out:
365 365
366static irqreturn_t twl_rtc_interrupt(int irq, void *rtc) 366static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
367{ 367{
368 unsigned long events = 0; 368 unsigned long events;
369 int ret = IRQ_NONE; 369 int ret = IRQ_NONE;
370 int res; 370 int res;
371 u8 rd_reg; 371 u8 rd_reg;
@@ -380,9 +380,9 @@ static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
380 * by reading RTS_INTERRUPTS_REGISTER[IT_TIMER,IT_ALARM] 380 * by reading RTS_INTERRUPTS_REGISTER[IT_TIMER,IT_ALARM]
381 */ 381 */
382 if (rd_reg & BIT_RTC_STATUS_REG_ALARM_M) 382 if (rd_reg & BIT_RTC_STATUS_REG_ALARM_M)
383 events |= RTC_IRQF | RTC_AF; 383 events = RTC_IRQF | RTC_AF;
384 else 384 else
385 events |= RTC_IRQF | RTC_UF; 385 events = RTC_IRQF | RTC_PF;
386 386
387 res = twl_rtc_write_u8(BIT_RTC_STATUS_REG_ALARM_M, 387 res = twl_rtc_write_u8(BIT_RTC_STATUS_REG_ALARM_M,
388 REG_RTC_STATUS_REG); 388 REG_RTC_STATUS_REG);