]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: at91rm9200: fix reading alarm value
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 10 Nov 2017 08:59:31 +0000 (09:59 +0100)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Fri, 10 Nov 2017 15:24:32 +0000 (16:24 +0100)
commit95c819d217ffc5f617f326359bac93745246617a
treec433d613ad7381be86260794721e85dd9d031216
parent47296dd847515fd0f49ec40d1763ae2e6d869891
rtc: at91rm9200: fix reading alarm value

When alarm value is read at boot time, at91_alarm_year is not yet set to
the proper value so the year is always set to 1900.

This results in that kind of message at boot:
rtc rtc0: invalid alarm value: 1900-1-14 2:11:39

There is no way to recover from that as the alarm is now only read when
booting.

Instead, rely on the rtc core to figure out the proper year.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-at91rm9200.c