Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322083
b: refs/heads/master
c: 7dbfb31
h: refs/heads/master
i:
  322081: 7d486af
  322079: b50968b
v: v3
  • Loading branch information
Atsushi Nemoto authored and Linus Torvalds committed Aug 21, 2012
1 parent b661e13 commit c66e455
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b121186ab1b12e2a96a945d88eae0735b4542158
refs/heads/master: 7dbfb315b2aaef0a115765946bf3026d074c33a7
7 changes: 5 additions & 2 deletions trunk/drivers/rtc/rtc-rs5c348.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,12 @@ rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm)
tm->tm_min = bcd2bin(rxbuf[RS5C348_REG_MINS] & RS5C348_MINS_MASK);
tm->tm_hour = bcd2bin(rxbuf[RS5C348_REG_HOURS] & RS5C348_HOURS_MASK);
if (!pdata->rtc_24h) {
tm->tm_hour %= 12;
if (rxbuf[RS5C348_REG_HOURS] & RS5C348_BIT_PM)
if (rxbuf[RS5C348_REG_HOURS] & RS5C348_BIT_PM) {
tm->tm_hour -= 20;
tm->tm_hour %= 12;
tm->tm_hour += 12;
} else
tm->tm_hour %= 12;
}
tm->tm_wday = bcd2bin(rxbuf[RS5C348_REG_WDAY] & RS5C348_WDAY_MASK);
tm->tm_mday = bcd2bin(rxbuf[RS5C348_REG_DAY] & RS5C348_DAY_MASK);
Expand Down

0 comments on commit c66e455

Please sign in to comment.