summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/mx27rtc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-04-20 12:37:19 -0600
committerSimon Glass <sjg@chromium.org>2015-05-05 20:58:20 -0600
commit714209832db1064886680b138f1abf9ce235b2c3 (patch)
tree6a786a91f13c0e154fb9f6a3068229ad1d2f5326 /drivers/rtc/mx27rtc.c
parent9f9276c34cbbf67fd1b3788f0be326b47fc69123 (diff)
downloadu-boot-714209832db1064886680b138f1abf9ce235b2c3.tar.gz
u-boot-714209832db1064886680b138f1abf9ce235b2c3.tar.xz
u-boot-714209832db1064886680b138f1abf9ce235b2c3.zip
dm: rtc: Rename mktime() and reduce the number of parameters
Most callers unpack the structure and pass each member. It seems better to pass the whole structure instead, as with the C library. Also add an rtc_ prefix. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/rtc/mx27rtc.c')
-rw-r--r--drivers/rtc/mx27rtc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/rtc/mx27rtc.c b/drivers/rtc/mx27rtc.c
index 7ba74d3b11..29ccdf1730 100644
--- a/drivers/rtc/mx27rtc.c
+++ b/drivers/rtc/mx27rtc.c
@@ -40,8 +40,7 @@ int rtc_set(struct rtc_time *time)
struct rtc_regs *rtc_regs = (struct rtc_regs *)IMX_RTC_BASE;
uint32_t day, hour, min, sec;
- sec = mktime(time->tm_year, time->tm_mon, time->tm_mday,
- time->tm_hour, time->tm_min, time->tm_sec);
+ sec = rtc_mktime(time);
day = sec / (24 * 3600);
sec = sec % (24 * 3600);