aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m48t59.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-m48t59.c')
-rw-r--r--drivers/rtc/rtc-m48t59.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c
index 761e9d7234fa..ce4eff6a8d51 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)
82 tm->tm_mday = BCD2BIN(M48T59_READ(M48T59_MDAY)); 82 tm->tm_mday = BCD2BIN(M48T59_READ(M48T59_MDAY));
83 83
84 val = M48T59_READ(M48T59_WDAY); 84 val = M48T59_READ(M48T59_WDAY);
85 if ((val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) { 85 if ((pdata->type == M48T59RTC_TYPE_M48T59) &&
86 (val & M48T59_WDAY_CEB) && (val & M48T59_WDAY_CB)) {
86 dev_dbg(dev, "Century bit is enabled\n"); 87 dev_dbg(dev, "Century bit is enabled\n");
87 tm->tm_year += 100; /* one century */ 88 tm->tm_year += 100; /* one century */
88 } 89 }