summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-da9052.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2020-03-06 08:35:47 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-04-01 12:33:43 +0200
commit06c4e103bf8a292d19697e670fb05a36a197e9da (patch)
tree1f9bd3a29f08de0527b2ad415df1388e2140c9c8 /drivers/rtc/rtc-da9052.c
parent23af616ca4da8af1ee92362d20abbb5e87b9ed88 (diff)
downloadlwn-06c4e103bf8a292d19697e670fb05a36a197e9da.tar.gz
lwn-06c4e103bf8a292d19697e670fb05a36a197e9da.zip
rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_tm time conversion. Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/20200306073548.57579-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-da9052.c')
-rw-r--r--drivers/rtc/rtc-da9052.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
index 39b909d24cc6..58de10da37b1 100644
--- a/drivers/rtc/rtc-da9052.c
+++ b/drivers/rtc/rtc-da9052.c
@@ -103,13 +103,11 @@ static int da9052_set_alarm(struct da9052_rtc *rtc, struct rtc_time *rtc_tm)
int ret;
uint8_t v[3];
- ret = rtc_tm_to_time(rtc_tm, &alm_time);
- if (ret != 0)
- return ret;
+ alm_time = rtc_tm_to_time64(rtc_tm);
if (rtc_tm->tm_sec > 0) {
alm_time += 60 - rtc_tm->tm_sec;
- rtc_time_to_tm(alm_time, rtc_tm);
+ rtc_time64_to_tm(alm_time, rtc_tm);
}
BUG_ON(rtc_tm->tm_sec); /* it will cause repeated irqs if not zero */