Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295240
b: refs/heads/master
c: ce9f650
h: refs/heads/master
v: v3
  • Loading branch information
Venu Byravarasu authored and Linus Torvalds committed Mar 23, 2012
1 parent 7e92cb7 commit e31fb3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b4f0b880c8d7eb225b79dec663780b4dcdea7fbc
refs/heads/master: ce9f650636d310e4c8febc821b0038e9918a12db
8 changes: 8 additions & 0 deletions trunk/drivers/rtc/rtc-twl.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ static int set_rtc_irq_bit(unsigned char bit)
unsigned char val;
int ret;

/* if the bit is set, return from here */
if (rtc_irq_bits & bit)
return 0;

val = rtc_irq_bits | bit;
val &= ~BIT_RTC_INTERRUPTS_REG_EVERY_M;
ret = twl_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG);
Expand All @@ -193,6 +197,10 @@ static int mask_rtc_irq_bit(unsigned char bit)
unsigned char val;
int ret;

/* if the bit is clear, return from here */
if (!(rtc_irq_bits & bit))
return 0;

val = rtc_irq_bits & ~bit;
ret = twl_rtc_write_u8(val, REG_RTC_INTERRUPTS_REG);
if (ret == 0)
Expand Down

0 comments on commit e31fb3d

Please sign in to comment.