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

rtc: ab3100: use .set_time

Use .set_time instead of the deprecated .set_mmss64.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

+3 -3
+3 -3
drivers/rtc/rtc-ab3100.c
··· 43 43 /* 44 44 * RTC clock functions and device struct declaration 45 45 */ 46 - static int ab3100_rtc_set_mmss(struct device *dev, time64_t secs) 46 + static int ab3100_rtc_set_time(struct device *dev, struct rtc_time *tm) 47 47 { 48 48 u8 regs[] = {AB3100_TI0, AB3100_TI1, AB3100_TI2, 49 49 AB3100_TI3, AB3100_TI4, AB3100_TI5}; 50 50 unsigned char buf[6]; 51 - u64 hw_counter = secs * AB3100_RTC_CLOCK_RATE * 2; 51 + u64 hw_counter = rtc_tm_to_time64(tm) * AB3100_RTC_CLOCK_RATE * 2; 52 52 int err = 0; 53 53 int i; 54 54 ··· 192 192 193 193 static const struct rtc_class_ops ab3100_rtc_ops = { 194 194 .read_time = ab3100_rtc_read_time, 195 - .set_mmss64 = ab3100_rtc_set_mmss, 195 + .set_time = ab3100_rtc_set_time, 196 196 .read_alarm = ab3100_rtc_read_alarm, 197 197 .set_alarm = ab3100_rtc_set_alarm, 198 198 .alarm_irq_enable = ab3100_rtc_irq_enable,