dm: rtc: Rename to_tm() to rtc_to_tm() and add error code
authorSimon Glass <sjg@chromium.org>
Mon, 20 Apr 2015 18:37:18 +0000 (12:37 -0600)
committerSimon Glass <sjg@chromium.org>
Wed, 6 May 2015 02:58:20 +0000 (20:58 -0600)
commit9f9276c34cbbf67fd1b3788f0be326b47fc69123
tree90e621bf20886ea798cddeae809422c530af476a
parent199e87c340bdd69a89e22f12e1201d67767e91a8
dm: rtc: Rename to_tm() to rtc_to_tm() and add error code

Rename this function so that it is clear that it is provided by the RTC.
Also return an error when it cannot function as expected. This is unlikely
to occur since it works for dates since 1752 and many RTCs do not support
such old dates. Still it is better to be accurate.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
16 files changed:
common/image.c
drivers/rtc/at91sam9_rtt.c
drivers/rtc/bfin_rtc.c
drivers/rtc/date.c
drivers/rtc/ds1374.c
drivers/rtc/ftrtc010.c
drivers/rtc/imxdi.c
drivers/rtc/mc13xxx-rtc.c
drivers/rtc/mcfrtc.c
drivers/rtc/mpc8xx.c
drivers/rtc/mx27rtc.c
drivers/rtc/mxsrtc.c
drivers/rtc/pl031.c
include/rtc.h
net/sntp.c
post/drivers/rtc.c