diff options
author | Robert Reif <reif@earthlink.net> | 2008-09-09 19:38:17 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-09 19:38:17 -0700 |
commit | 833be4e1f080050706901d8605f2e9ee863464a9 (patch) | |
tree | 7af3e41f6ba81b4c4457370002485239da43e136 /drivers/rtc/rtc-m48t59.c | |
parent | 088a39623660f2875aaf15649bf663bbb5a8a219 (diff) | |
download | linux-3.10-833be4e1f080050706901d8605f2e9ee863464a9.tar.gz linux-3.10-833be4e1f080050706901d8605f2e9ee863464a9.tar.bz2 linux-3.10-833be4e1f080050706901d8605f2e9ee863464a9.zip |
rtc-m48t59: Only check century bits on m48t59 chips.
Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/rtc/rtc-m48t59.c')
-rw-r--r-- | drivers/rtc/rtc-m48t59.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index 761e9d7234f..ce4eff6a8d5 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c @@ -82,7 +82,8 @@ static int m48t59_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_mday = BCD2BIN(M48T59_READ(M48T59_MDAY)); val = M48T59_READ(M48T59_WDAY); - if ((val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) { + if ((pdata->type == M48T59RTC_TYPE_M48T59) && + (val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) { dev_dbg(dev, "Century bit is enabled\n"); tm->tm_year += 100; /* one century */ } |