]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: mv: reset date if after year 2038
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 18 Feb 2014 13:26:06 +0000 (14:26 +0100)
committerJason Cooper <jason@lakedaemon.net>
Fri, 21 Feb 2014 23:29:05 +0000 (23:29 +0000)
commit9dbb936536e7fd402a251ad8505828a2eeb2c2a3
tree3b93a9f8c33eeb947a1be61b18c2e2dfe9b044e2
parent3d2ec3008b6fe0eb6625c7e3354c20ff4684e68e
rtc: mv: reset date if after year 2038

Dates after January, 19th 2038 are badly handled by userspace due to
the time being stored on 32 bits. This causes issues on some Marvell
platform on which the RTC is initialized by default to a date that's
beyond 2038, causing a really weird behavior of the RTC.

In order to avoid that, reset the date to a sane value if the RTC is
beyond 2038.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/rtc/rtc-mv.c