Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b599db3a authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

rtc: da9063: switch to rtc_time64_to_tm/rtc_tm_to_time64



Call the 64bit versions of rtc_tm time conversion now that the range is
enforced by the core.

Acked-by: default avatarSteve Twiss <stwiss.opensource@diasemi.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 5ff404d1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)