Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115968
b: refs/heads/master
c: e232cfd
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Oct 20, 2008
1 parent d95017d commit 40d3356
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 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: 357c6e63590895dc87cc9300f5a1c27544ea69e8
refs/heads/master: e232cfdc3d087d435c9ee767ddd4e6f52457d02a
30 changes: 15 additions & 15 deletions trunk/drivers/rtc/rtc-bq4802.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ static int bq4802_read_time(struct device *dev, struct rtc_time *tm)

spin_unlock_irqrestore(&p->lock, flags);

BCD_TO_BIN(tm->tm_sec);
BCD_TO_BIN(tm->tm_min);
BCD_TO_BIN(tm->tm_hour);
BCD_TO_BIN(tm->tm_mday);
BCD_TO_BIN(tm->tm_mon);
BCD_TO_BIN(tm->tm_year);
BCD_TO_BIN(tm->tm_wday);
BCD_TO_BIN(century);
tm->tm_sec = bcd2bin(tm->tm_sec);
tm->tm_min = bcd2bin(tm->tm_min);
tm->tm_hour = bcd2bin(tm->tm_hour);
tm->tm_mday = bcd2bin(tm->tm_mday);
tm->tm_mon = bcd2bin(tm->tm_mon);
tm->tm_year = bcd2bin(tm->tm_year);
tm->tm_wday = bcd2bin(tm->tm_wday);
century = bcd2bin(century);

tm->tm_year += (century * 100);
tm->tm_year -= 1900;
Expand Down Expand Up @@ -106,13 +106,13 @@ static int bq4802_set_time(struct device *dev, struct rtc_time *tm)
min = tm->tm_min;
sec = tm->tm_sec;

BIN_TO_BCD(sec);
BIN_TO_BCD(min);
BIN_TO_BCD(hrs);
BIN_TO_BCD(day);
BIN_TO_BCD(mon);
BIN_TO_BCD(yrs);
BIN_TO_BCD(century);
sec = bin2bcd(sec);
min = bin2bcd(min);
hrs = bin2bcd(hrs);
day = bin2bcd(day);
mon = bin2bcd(mon);
yrs = bin2bcd(yrs);
century = bin2bcd(century);

spin_lock_irqsave(&p->lock, flags);

Expand Down

0 comments on commit 40d3356

Please sign in to comment.