aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/systohc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/systohc.c')
-rw-r--r--drivers/rtc/systohc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/rtc/systohc.c b/drivers/rtc/systohc.c
index eb71872d0361..7728d5e32bf4 100644
--- a/drivers/rtc/systohc.c
+++ b/drivers/rtc/systohc.c
@@ -11,7 +11,7 @@
11 * rtc_set_ntp_time - Save NTP synchronized time to the RTC 11 * rtc_set_ntp_time - Save NTP synchronized time to the RTC
12 * @now: Current time of day 12 * @now: Current time of day
13 * 13 *
14 * Replacement for the NTP platform function update_persistent_clock 14 * Replacement for the NTP platform function update_persistent_clock64
15 * that stores time for later retrieval by rtc_hctosys. 15 * that stores time for later retrieval by rtc_hctosys.
16 * 16 *
17 * Returns 0 on successful RTC update, -ENODEV if a RTC update is not 17 * Returns 0 on successful RTC update, -ENODEV if a RTC update is not
@@ -35,7 +35,10 @@ int rtc_set_ntp_time(struct timespec64 now)
35 if (rtc) { 35 if (rtc) {
36 /* rtc_hctosys exclusively uses UTC, so we call set_time here, 36 /* rtc_hctosys exclusively uses UTC, so we call set_time here,
37 * not set_mmss. */ 37 * not set_mmss. */
38 if (rtc->ops && (rtc->ops->set_time || rtc->ops->set_mmss)) 38 if (rtc->ops &&
39 (rtc->ops->set_time ||
40 rtc->ops->set_mmss64 ||
41 rtc->ops->set_mmss))
39 err = rtc_set_time(rtc, &tm); 42 err = rtc_set_time(rtc, &tm);
40 rtc_class_close(rtc); 43 rtc_class_close(rtc);
41 } 44 }