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

rtc: lpc32xx: 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: Alexandre Belloni <alexandre.belloni@bootlin.com>

+3 -8
+3 -8
drivers/rtc/rtc-lpc32xx.c
··· 66 66 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); 67 67 68 68 elapsed_sec = rtc_readl(rtc, LPC32XX_RTC_UCOUNT); 69 - rtc_time_to_tm(elapsed_sec, time); 69 + rtc_time64_to_tm(elapsed_sec, time); 70 70 71 71 return 0; 72 72 } ··· 95 95 { 96 96 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); 97 97 98 - rtc_time_to_tm(rtc_readl(rtc, LPC32XX_RTC_MATCH0), &wkalrm->time); 98 + rtc_time64_to_tm(rtc_readl(rtc, LPC32XX_RTC_MATCH0), &wkalrm->time); 99 99 wkalrm->enabled = rtc->alarm_enabled; 100 100 wkalrm->pending = !!(rtc_readl(rtc, LPC32XX_RTC_INTSTAT) & 101 101 LPC32XX_RTC_INTSTAT_MATCH0); ··· 109 109 struct lpc32xx_rtc *rtc = dev_get_drvdata(dev); 110 110 unsigned long alarmsecs; 111 111 u32 tmp; 112 - int ret; 113 112 114 - ret = rtc_tm_to_time(&wkalrm->time, &alarmsecs); 115 - if (ret < 0) { 116 - dev_warn(dev, "Failed to convert time: %d\n", ret); 117 - return ret; 118 - } 113 + alarmsecs = rtc_tm_to_time64(&wkalrm->time); 119 114 120 115 spin_lock_irq(&rtc->lock); 121 116