rtc: pcf8563 fix: return -EINVAL if we read an invalid time.
authorJan Kardell <jan.kardell@telliq.com>
Thu, 28 May 2015 06:48:45 +0000 (08:48 +0200)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 24 Jun 2015 23:13:40 +0000 (01:13 +0200)
commit538330ccb93849530f5617d1fa870237496caa60
tree5079ddae4de1e6ae2f5440c4a5e52efd1934fc3e
parent98a9bb5bf44bb6ee372f2a3b42703f597030cc48
rtc: pcf8563 fix: return -EINVAL if we read an invalid time.

Return -EINVAL if the voltage low bit is set to avoid getting a bogus
time at boot.
There was a comment stating that util-linux hwclock refuses to set a
new time if we return an error code on read, but at least the current
version do set the time as expected. Remove the comment and the check
for valid time, and let the rtc core check it for us.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/rtc/rtc-pcf8563.c