Commit 34ea0ac3 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: tegra: 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 avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent e1089802
...@@ -123,7 +123,7 @@ static int tegra_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -123,7 +123,7 @@ static int tegra_rtc_read_time(struct device *dev, struct rtc_time *tm)
spin_unlock_irqrestore(&info->tegra_rtc_lock, sl_irq_flags); spin_unlock_irqrestore(&info->tegra_rtc_lock, sl_irq_flags);
rtc_time_to_tm(sec, tm); rtc_time64_to_tm(sec, tm);
dev_vdbg(dev, "time read as %lu. %ptR\n", sec, tm); dev_vdbg(dev, "time read as %lu. %ptR\n", sec, tm);
...@@ -137,7 +137,7 @@ static int tegra_rtc_set_time(struct device *dev, struct rtc_time *tm) ...@@ -137,7 +137,7 @@ static int tegra_rtc_set_time(struct device *dev, struct rtc_time *tm)
int ret; int ret;
/* convert tm to seconds. */ /* convert tm to seconds. */
rtc_tm_to_time(tm, &sec); sec = rtc_tm_to_time64(tm);
dev_vdbg(dev, "time set to %lu. %ptR\n", sec, tm); dev_vdbg(dev, "time set to %lu. %ptR\n", sec, tm);
...@@ -166,7 +166,7 @@ static int tegra_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -166,7 +166,7 @@ static int tegra_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
} else { } else {
/* alarm is enabled. */ /* alarm is enabled. */
alarm->enabled = 1; alarm->enabled = 1;
rtc_time_to_tm(sec, &alarm->time); rtc_time64_to_tm(sec, &alarm->time);
} }
tmp = readl(info->rtc_base + TEGRA_RTC_REG_INTR_STATUS); tmp = readl(info->rtc_base + TEGRA_RTC_REG_INTR_STATUS);
...@@ -204,7 +204,7 @@ static int tegra_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -204,7 +204,7 @@ static int tegra_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
unsigned long sec; unsigned long sec;
if (alarm->enabled) if (alarm->enabled)
rtc_tm_to_time(&alarm->time, &sec); sec = rtc_tm_to_time64(&alarm->time);
else else
sec = 0; sec = 0;
......
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