Commit 833be4e1 authored by Robert Reif's avatar Robert Reif Committed by David S. Miller

rtc-m48t59: Only check century bits on m48t59 chips.

Signed-off-by: default avatarRobert Reif <reif@earthlink.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 088a3962
......@@ -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 */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment