summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/ds1374.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/ds1374.c
parent9f9276c34cbbf67fd1b3788f0be326b47fc69123 (diff)
downloadtalos-obmc-uboot-714209832db1064886680b138f1abf9ce235b2c3.tar.gz
talos-obmc-uboot-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/ds1374.c')
-rw-r--r--drivers/rtc/ds1374.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/rtc/ds1374.c b/drivers/rtc/ds1374.c
index 04793b54be..78473570b9 100644
--- a/drivers/rtc/ds1374.c
+++ b/drivers/rtc/ds1374.c
@@ -147,9 +147,7 @@ int rtc_set (struct rtc_time *tmp){
if (tmp->tm_year < 1970 || tmp->tm_year > 2069)
printf("WARNING: year should be between 1970 and 2069!\n");
- time = mktime(tmp->tm_year, tmp->tm_mon,
- tmp->tm_mday, tmp->tm_hour,
- tmp->tm_min, tmp->tm_sec);
+ time = rtc_mktime(tmp);
DEBUGR ("Set RTC s since 1.1.1970: %ld (0x%02lx)\n", time, time);
OpenPOWER on IntegriCloud