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

rtc: mxc: use .set_time

Use .set_time instead of the deprecated .set_mmss64.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+4 -2
+4 -2
drivers/rtc/rtc-mxc.c
··· 254 254 /* 255 255 * This function sets the internal RTC time based on tm in Gregorian date. 256 256 */ 257 - static int mxc_rtc_set_mmss(struct device *dev, time64_t time) 257 + static int mxc_rtc_set_time(struct device *dev, struct rtc_time *tm) 258 258 { 259 + time64_t time = rtc_tm_to_time64(tm); 260 + 259 261 /* Avoid roll-over from reading the different registers */ 260 262 do { 261 263 set_alarm_or_time(dev, MXC_RTC_TIME, time); ··· 300 298 /* RTC layer */ 301 299 static const struct rtc_class_ops mxc_rtc_ops = { 302 300 .read_time = mxc_rtc_read_time, 303 - .set_mmss64 = mxc_rtc_set_mmss, 301 + .set_time = mxc_rtc_set_time, 304 302 .read_alarm = mxc_rtc_read_alarm, 305 303 .set_alarm = mxc_rtc_set_alarm, 306 304 .alarm_irq_enable = mxc_rtc_alarm_irq_enable,