Commit 93059793 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: imxdi: 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.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 21c9dfda
...@@ -552,7 +552,7 @@ static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -552,7 +552,7 @@ static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm)
unsigned long now; unsigned long now;
now = readl(imxdi->ioaddr + DTCMR); now = readl(imxdi->ioaddr + DTCMR);
rtc_time_to_tm(now, tm); rtc_time64_to_tm(now, tm);
return 0; return 0;
} }
...@@ -618,7 +618,7 @@ static int dryice_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -618,7 +618,7 @@ static int dryice_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
u32 dcamr; u32 dcamr;
dcamr = readl(imxdi->ioaddr + DCAMR); dcamr = readl(imxdi->ioaddr + DCAMR);
rtc_time_to_tm(dcamr, &alarm->time); rtc_time64_to_tm(dcamr, &alarm->time);
/* alarm is enabled if the interrupt is enabled */ /* alarm is enabled if the interrupt is enabled */
alarm->enabled = (readl(imxdi->ioaddr + DIER) & DIER_CAIE) != 0; alarm->enabled = (readl(imxdi->ioaddr + DIER) & DIER_CAIE) != 0;
...@@ -644,9 +644,7 @@ static int dryice_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -644,9 +644,7 @@ static int dryice_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
unsigned long alarm_time; unsigned long alarm_time;
int rc; int rc;
rc = rtc_tm_to_time(&alarm->time, &alarm_time); alarm_time = rtc_tm_to_time64(&alarm->time);
if (rc)
return rc;
/* don't allow setting alarm in the past */ /* don't allow setting alarm in the past */
now = readl(imxdi->ioaddr + DTCMR); now = readl(imxdi->ioaddr + DTCMR);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment