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

rtc: test: use .set_time

Use .set_time instead of the deprecated .set_mmss64.

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

+4 -4
+4 -4
drivers/rtc/rtc-test.c
··· 70 70 return 0; 71 71 } 72 72 73 - static int test_rtc_set_mmss64(struct device *dev, time64_t secs) 73 + static int test_rtc_set_time(struct device *dev, struct rtc_time *tm) 74 74 { 75 75 struct rtc_test_data *rtd = dev_get_drvdata(dev); 76 76 77 - rtd->offset = secs - ktime_get_real_seconds(); 77 + rtd->offset = rtc_tm_to_time64(tm) - ktime_get_real_seconds(); 78 78 79 79 return 0; 80 80 } ··· 94 94 95 95 static const struct rtc_class_ops test_rtc_ops_noalm = { 96 96 .read_time = test_rtc_read_time, 97 - .set_mmss64 = test_rtc_set_mmss64, 97 + .set_time = test_rtc_set_time, 98 98 .alarm_irq_enable = test_rtc_alarm_irq_enable, 99 99 }; 100 100 101 101 static const struct rtc_class_ops test_rtc_ops = { 102 102 .read_time = test_rtc_read_time, 103 + .set_time = test_rtc_set_time, 103 104 .read_alarm = test_rtc_read_alarm, 104 105 .set_alarm = test_rtc_set_alarm, 105 - .set_mmss64 = test_rtc_set_mmss64, 106 106 .alarm_irq_enable = test_rtc_alarm_irq_enable, 107 107 }; 108 108