From: James S. <jsi...@us...> - 2001-11-12 18:14:36
|
Update of /cvsroot/linux-mips/linux/arch/mips/ddb5xxx/common In directory usw-pr-cvs1:/tmp/cvs-serv30004 Modified Files: rtc_ds1386.c Log Message: Months in struct tm are counted from 0-11, in the DS1386 from 1-12. Index: rtc_ds1386.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/ddb5xxx/common/rtc_ds1386.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- rtc_ds1386.c 2001/10/11 20:45:25 1.4 +++ rtc_ds1386.c 2001/11/12 18:14:34 1.5 @@ -101,7 +101,7 @@ } temp = READ_RTC(0x9); - month = BIN_TO_BCD(tm.tm_mon); + month = BIN_TO_BCD(tm.tm_mon+1); /* tm_mon starts from 0 to 11 */ if (month != (temp & 0x1f)) { WRITE_RTC( 0x9, (month & 0x1f) | (temp & ~0x1f) ); |