rtc: da9063: switch to rtc_time64_to_tm/rtc_tm_to_time64
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 21 Mar 2019 10:15:57 +0000 (11:15 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 4 Apr 2019 08:07:10 +0000 (10:07 +0200)
Call the 64bit versions of rtc_tm time conversion now that the range is
enforced by the core.

Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-da9063.c

index b7052156e851e7054403e8804430424e1fa7794c..1b792bcea3c789665be96b0e29ec51d2457b8a81 100644 (file)
@@ -239,8 +239,8 @@ static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm)
 
        da9063_data_to_tm(data, tm, rtc);
 
-       rtc_tm_to_time(tm, &tm_secs);
-       rtc_tm_to_time(&rtc->alarm_time, &al_secs);
+       tm_secs = rtc_tm_to_time64(tm);
+       al_secs = rtc_tm_to_time64(&rtc->alarm_time);
 
        /* handle the rtc synchronisation delay */
        if (rtc->rtc_sync == true && al_secs - tm_secs == 1)