Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44318
b: refs/heads/master
c: a161479
h: refs/heads/master
v: v3
  • Loading branch information
Jamie Lenehan authored and Paul Mundt committed Dec 11, 2006
1 parent 49517c1 commit 6c0956e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 55eec11a50f4c5f53421f49e407e2c92cf25c3ca
refs/heads/master: a16147965ca7a84dc08c4457961782e06ac7cd0d
6 changes: 3 additions & 3 deletions trunk/drivers/rtc/rtc-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm)
tm->tm_hour = BCD2BIN(readb(rtc->regbase + RHRCNT));
tm->tm_wday = BCD2BIN(readb(rtc->regbase + RWKCNT));
tm->tm_mday = BCD2BIN(readb(rtc->regbase + RDAYCNT));
tm->tm_mon = BCD2BIN(readb(rtc->regbase + RMONCNT));
tm->tm_mon = BCD2BIN(readb(rtc->regbase + RMONCNT)) - 1;

#if defined(CONFIG_CPU_SH4)
yr = readw(rtc->regbase + RYRCNT);
Expand Down Expand Up @@ -296,7 +296,7 @@ static int sh_rtc_read_time(struct device *dev, struct rtc_time *tm)
"mday=%d, mon=%d, year=%d, wday=%d\n",
__FUNCTION__,
tm->tm_sec, tm->tm_min, tm->tm_hour,
tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday);
tm->tm_mday, tm->tm_mon + 1, tm->tm_year, tm->tm_wday);

if (rtc_valid_tm(tm) < 0)
dev_err(dev, "invalid date\n");
Expand All @@ -323,7 +323,7 @@ static int sh_rtc_set_time(struct device *dev, struct rtc_time *tm)
writeb(BIN2BCD(tm->tm_hour), rtc->regbase + RHRCNT);
writeb(BIN2BCD(tm->tm_wday), rtc->regbase + RWKCNT);
writeb(BIN2BCD(tm->tm_mday), rtc->regbase + RDAYCNT);
writeb(BIN2BCD(tm->tm_mon), rtc->regbase + RMONCNT);
writeb(BIN2BCD(tm->tm_mon + 1), rtc->regbase + RMONCNT);

#ifdef CONFIG_CPU_SH3
year = tm->tm_year % 100;
Expand Down

0 comments on commit 6c0956e

Please sign in to comment.