mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
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>
This commit is contained in:
parent
94a339d016
commit
2778ebcc09
1 changed files with 3 additions and 3 deletions
|
@ -365,7 +365,7 @@ static int twl_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
|
|||
|
||||
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;
|
||||
|
@ -380,9 +380,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);
|
||||
|
|
Loading…
Reference in a new issue