[pkg-fso-commits] [SCM] linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko branch, andy-tracking, updated. upstream/20090303.gitb9de904e-140-g23b564c
Werner Almesberger
werner at openmoko.org
Mon Jun 8 17:29:56 UTC 2009
The following commit has been merged in the andy-tracking branch:
commit 60c66130a4467ca2a2994a6e3d7d5ac63839eefb
Author: Werner Almesberger <werner at openmoko.org>
Date: Tue Mar 31 23:23:05 2009 -0300
rtc-pcf50606: Fix month off-by-one error
According to the PCF50606 manual, the issues resoved by commit
cc1663fc922c03feb0d7bbb8b18d62fbac0128de also exists there.
Signed-off-by: Werner Almesberger <werner at openmoko.org>
Reported-by: Rask Ingemann Lambertsen <rask at sygehus.dk>
diff --git a/drivers/rtc/rtc-pcf50606.c b/drivers/rtc/rtc-pcf50606.c
index e059093..434cfc1 100644
--- a/drivers/rtc/rtc-pcf50606.c
+++ b/drivers/rtc/rtc-pcf50606.c
@@ -70,7 +70,7 @@ static void pcf2rtc_time(struct rtc_time *rtc, struct pcf50606_time *pcf)
rtc->tm_hour = bcd2bin(pcf->time[PCF50606_TI_HOUR]);
rtc->tm_wday = bcd2bin(pcf->time[PCF50606_TI_WKDAY]);
rtc->tm_mday = bcd2bin(pcf->time[PCF50606_TI_DAY]);
- rtc->tm_mon = bcd2bin(pcf->time[PCF50606_TI_MONTH]);
+ rtc->tm_mon = bcd2bin(pcf->time[PCF50606_TI_MONTH]) - 1;
rtc->tm_year = bcd2bin(pcf->time[PCF50606_TI_YEAR]) + 100;
}
@@ -81,7 +81,7 @@ static void rtc2pcf_time(struct pcf50606_time *pcf, struct rtc_time *rtc)
pcf->time[PCF50606_TI_HOUR] = bin2bcd(rtc->tm_hour);
pcf->time[PCF50606_TI_WKDAY] = bin2bcd(rtc->tm_wday);
pcf->time[PCF50606_TI_DAY] = bin2bcd(rtc->tm_mday);
- pcf->time[PCF50606_TI_MONTH] = bin2bcd(rtc->tm_mon);
+ pcf->time[PCF50606_TI_MONTH] = bin2bcd(rtc->tm_mon + 1);
pcf->time[PCF50606_TI_YEAR] = bin2bcd(rtc->tm_year % 100);
}
--
linux-2.6-openmoko, the Linux 2.6 kernel tree from Openmoko
More information about the pkg-fso-commits
mailing list