Patchwork [2/3] rtc: twl: Simplify RTC interrupt clearing

login
register
mail settings
Submitter Venu Byravarasu
Date Jan. 19, 2012, 10:12 a.m.
Message ID <1326967949-8248-3-git-send-email-vbyravarasu@nvidia.com>
Download mbox | patch
Permalink /patch/136800/
State New
Headers show

Comments

Venu Byravarasu - Jan. 19, 2012, 10:12 a.m.
From: Venu Byravarasu <vbyravarasu@nvidia.com>

For clearing RTC interrupt, programming ALARM bit only is
sufficient, as all other bits are any way not affected by
writing 0 to them.

Hence removed unwanted OR operation.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
 drivers/rtc/rtc-twl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 61ae1b7..1c85443 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -376,7 +376,7 @@  static irqreturn_t twl_rtc_interrupt(int irq, void *rtc)
 	else
 		events |= RTC_IRQF | RTC_UF;
 
-	res = twl_rtc_write_u8(rd_reg | BIT_RTC_STATUS_REG_ALARM_M,
+	res = twl_rtc_write_u8(BIT_RTC_STATUS_REG_ALARM_M,
 				   REG_RTC_STATUS_REG);
 	if (res)
 		goto out;