Message ID | 1356893793-29537-1-git-send-email-linux@prisktech.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/rtc/rtc-vt8500.c b/drivers/rtc/rtc-vt8500.c index 14e2d8c..37b42a4 100644 --- a/drivers/rtc/rtc-vt8500.c +++ b/drivers/rtc/rtc-vt8500.c @@ -137,7 +137,7 @@ static int vt8500_rtc_set_time(struct device *dev, struct rtc_time *tm) return -EINVAL; } - writel((bin2bcd(tm->tm_year - 100) << DATE_YEAR_S) + writel((bin2bcd(tm->tm_year % 100) << DATE_YEAR_S) | (bin2bcd(tm->tm_mon) << DATE_MONTH_S) | (bin2bcd(tm->tm_mday)), vt8500_rtc->regbase + VT8500_RTC_DS);