[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1326967949-8248-4-git-send-email-vbyravarasu@nvidia.com>
Date: Thu, 19 Jan 2012 15:42:29 +0530
From: Venu Byravarasu <vbyravarasu@...dia.com>
To: a.zummo@...ertech.it, rtc-linux@...glegroups.com,
linux-kernel@...r.kernel.org
Cc: swarren@...dia.com, Venu Byravarasu <vbyravarasu@...dia.com>
Subject: [PATCH 3/3] rtc: twl: Return correct RTC event from ISR
From: Venu Byravarasu <vbyravarasu@...dia.com>
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@...dia.com>
---
drivers/rtc/rtc-twl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 1c85443..a0236a0 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -357,7 +357,7 @@ out:
static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
{
- unsigned long events = 0;
+ unsigned long events;
int ret = IRQ_NONE;
int res;
u8 rd_reg;
@@ -372,9 +372,9 @@ static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
* by reading RTS_INTERRUPTS_REGISTER[IT_TIMER,IT_ALARM]
*/
if (rd_reg & BIT_RTC_STATUS_REG_ALARM_M)
- events |= RTC_IRQF | RTC_AF;
+ events = RTC_IRQF | RTC_AF;
else
- events |= RTC_IRQF | RTC_UF;
+ events = RTC_IRQF | RTC_PF;
res = twl_rtc_write_u8(BIT_RTC_STATUS_REG_ALARM_M,
REG_RTC_STATUS_REG);
--
1.7.1.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists