Revision 48a7f7746875425797aea31ed2910088635c1c7a authored by Johannes Weiner on 01 December 2009, 21:17:48 UTC, committed by Linus Torvalds on 02 December 2009, 00:32:20 UTC
The possible CCR_Y2K register values are 19 or 20 and struct rtc_time's tm_year is in years since 1900. The function translating rtc_time to register values assumes tm_year to be years since first christmas, though, and we end up storing 0 or 1 in the CCR_Y2K register, which the hardware does not refuse to do. A subsequent probing of the clock fails due to the invalid value range in the register, though. [ And if it didn't, reading the clock would yield a bogus year because the function translating registers to tm_year is assuming a register value of 19 or 20. ] This fixes the conversion from years since 1900 in tm_year to the corresponding CCR_Y2K value of 19 or 20. Signed-off-by: Johannes Weiner <jw@emlix.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Paul Gortmaker <p_gortmaker@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0a1f127
File | Mode | Size |
---|---|---|
00-INDEX | -rw-r--r-- | 1.5 KB |
CREDITS | -rw-r--r-- | 1.9 KB |
HiSax.cert | -rw-r--r-- | 3.9 KB |
INTERFACE | -rw-r--r-- | 27.2 KB |
INTERFACE.CAPI | -rw-r--r-- | 13.9 KB |
INTERFACE.fax | -rw-r--r-- | 4.5 KB |
README | -rw-r--r-- | 28.6 KB |
README.FAQ | -rw-r--r-- | 721 bytes |
README.HiSax | -rw-r--r-- | 23.3 KB |
README.act2000 | -rw-r--r-- | 3.5 KB |
README.audio | -rw-r--r-- | 5.8 KB |
README.avmb1 | -rw-r--r-- | 5.5 KB |
README.concap | -rw-r--r-- | 10.5 KB |
README.diversion | -rw-r--r-- | 6.1 KB |
README.fax | -rw-r--r-- | 1.1 KB |
README.gigaset | -rw-r--r-- | 13.2 KB |
README.hfc-pci | -rw-r--r-- | 1.8 KB |
README.hysdn | -rw-r--r-- | 7.8 KB |
README.icn | -rw-r--r-- | 5.0 KB |
README.mISDN | -rw-r--r-- | 328 bytes |
README.pcbit | -rw-r--r-- | 1.6 KB |
README.sc | -rw-r--r-- | 11.9 KB |
README.syncppp | -rw-r--r-- | 2.1 KB |
README.x25 | -rw-r--r-- | 7.1 KB |
syncPPP.FAQ | -rw-r--r-- | 7.9 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...