rtc: da9052: switch to rtc_time64_to_tm/rtc_tm_to_time64
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 6 Mar 2020 07:35:47 +0000 (08:35 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 1 Apr 2020 10:33:43 +0000 (12:33 +0200)
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>
drivers/rtc/rtc-da9052.c

index 39b909d24cc66d2b9052f4a83de88ce23d4cf76a..58de10da37b1a3a0d4d32a8b07f3eee7a0d470c4 100644 (file)
@@ -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 */