Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Thierry Reding <treding@nvidia.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+4 -4
+4 -4
drivers/rtc/rtc-tegra.c
··· 123 123 124 124 spin_unlock_irqrestore(&info->tegra_rtc_lock, sl_irq_flags); 125 125 126 - rtc_time_to_tm(sec, tm); 126 + rtc_time64_to_tm(sec, tm); 127 127 128 128 dev_vdbg(dev, "time read as %lu. %ptR\n", sec, tm); 129 129 ··· 137 137 int ret; 138 138 139 139 /* convert tm to seconds. */ 140 - rtc_tm_to_time(tm, &sec); 140 + sec = rtc_tm_to_time64(tm); 141 141 142 142 dev_vdbg(dev, "time set to %lu. %ptR\n", sec, tm); 143 143 ··· 166 166 } else { 167 167 /* alarm is enabled. */ 168 168 alarm->enabled = 1; 169 - rtc_time_to_tm(sec, &alarm->time); 169 + rtc_time64_to_tm(sec, &alarm->time); 170 170 } 171 171 172 172 tmp = readl(info->rtc_base + TEGRA_RTC_REG_INTR_STATUS); ··· 204 204 unsigned long sec; 205 205 206 206 if (alarm->enabled) 207 - rtc_tm_to_time(&alarm->time, &sec); 207 + sec = rtc_tm_to_time64(&alarm->time); 208 208 else 209 209 sec = 0; 210 210