Skip to content

Commit 99b7ac9

Browse files
rtc: sun6i: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_tm time conversion. Tested-by: Paul Kocialkowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent fd90d48 commit 99b7ac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/rtc/rtc-sun6i.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static int sun6i_rtc_getalarm(struct device *dev, struct rtc_wkalrm *wkalrm)
499499

500500
wkalrm->enabled = !!(alrm_en & SUN6I_ALRM_EN_CNT_EN);
501501
wkalrm->pending = !!(alrm_st & SUN6I_ALRM_EN_CNT_EN);
502-
rtc_time_to_tm(chip->alarm, &wkalrm->time);
502+
rtc_time64_to_tm(chip->alarm, &wkalrm->time);
503503

504504
return 0;
505505
}
@@ -520,8 +520,8 @@ static int sun6i_rtc_setalarm(struct device *dev, struct rtc_wkalrm *wkalrm)
520520
return -EINVAL;
521521
}
522522

523-
rtc_tm_to_time(alrm_tm, &time_set);
524-
rtc_tm_to_time(&tm_now, &time_now);
523+
time_set = rtc_tm_to_time64(alrm_tm);
524+
time_now = rtc_tm_to_time64(&tm_now);
525525
if (time_set <= time_now) {
526526
dev_err(dev, "Date to set in the past\n");
527527
return -EINVAL;

0 commit comments

Comments
 (0)