diff options
author | Simon Glass <sjg@chromium.org> | 2015-04-20 18:37:18 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-05-06 02:58:20 (GMT) |
commit | 9f9276c34cbbf67fd1b3788f0be326b47fc69123 (patch) | |
tree | 90e621bf20886ea798cddeae809422c530af476a /drivers/rtc/mcfrtc.c | |
parent | 199e87c340bdd69a89e22f12e1201d67767e91a8 (diff) | |
download | u-boot-fsl-qoriq-9f9276c34cbbf67fd1b3788f0be326b47fc69123.tar.xz |
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>
Diffstat (limited to 'drivers/rtc/mcfrtc.c')
-rw-r--r-- | drivers/rtc/mcfrtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/mcfrtc.c b/drivers/rtc/mcfrtc.c index 8961ca4..e02e297 100644 --- a/drivers/rtc/mcfrtc.c +++ b/drivers/rtc/mcfrtc.c @@ -38,7 +38,7 @@ int rtc_get(struct rtc_time *tmp) tim = (tim * 60) + rtc_mins; tim = (tim * 60) + rtc->seconds; - to_tm(tim, tmp); + rtc_to_tm(tim, tmp); tmp->tm_yday = 0; tmp->tm_isdst = 0; |