diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/interface.c | 6 | ||||
-rw-r--r-- | drivers/rtc/systohc.c | 6 |
2 files changed, 1 insertions, 11 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 56ed0c3a8c85..4124f4dd376b 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -145,12 +145,6 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) | |||
145 | err = -ENODEV; | 145 | err = -ENODEV; |
146 | else if (rtc->ops->set_time) | 146 | else if (rtc->ops->set_time) |
147 | err = rtc->ops->set_time(rtc->dev.parent, tm); | 147 | err = rtc->ops->set_time(rtc->dev.parent, tm); |
148 | else if (rtc->ops->set_mmss64) | ||
149 | err = rtc->ops->set_mmss64(rtc->dev.parent, | ||
150 | rtc_tm_to_time64(tm)); | ||
151 | else if (rtc->ops->set_mmss) | ||
152 | err = rtc->ops->set_mmss(rtc->dev.parent, | ||
153 | rtc_tm_to_time64(tm)); | ||
154 | else | 148 | else |
155 | err = -EINVAL; | 149 | err = -EINVAL; |
156 | 150 | ||
diff --git a/drivers/rtc/systohc.c b/drivers/rtc/systohc.c index 8bf8e0c1e8fd..8b70f0520e13 100644 --- a/drivers/rtc/systohc.c +++ b/drivers/rtc/systohc.c | |||
@@ -30,8 +30,7 @@ int rtc_set_ntp_time(struct timespec64 now, unsigned long *target_nsec) | |||
30 | if (!rtc) | 30 | if (!rtc) |
31 | goto out_err; | 31 | goto out_err; |
32 | 32 | ||
33 | if (!rtc->ops || (!rtc->ops->set_time && !rtc->ops->set_mmss64 && | 33 | if (!rtc->ops || !rtc->ops->set_time) |
34 | !rtc->ops->set_mmss)) | ||
35 | goto out_close; | 34 | goto out_close; |
36 | 35 | ||
37 | /* Compute the value of tv_nsec we require the caller to supply in | 36 | /* Compute the value of tv_nsec we require the caller to supply in |
@@ -53,9 +52,6 @@ int rtc_set_ntp_time(struct timespec64 now, unsigned long *target_nsec) | |||
53 | 52 | ||
54 | rtc_time64_to_tm(to_set.tv_sec, &tm); | 53 | rtc_time64_to_tm(to_set.tv_sec, &tm); |
55 | 54 | ||
56 | /* rtc_hctosys exclusively uses UTC, so we call set_time here, not | ||
57 | * set_mmss. | ||
58 | */ | ||
59 | err = rtc_set_time(rtc, &tm); | 55 | err = rtc_set_time(rtc, &tm); |
60 | 56 | ||
61 | out_close: | 57 | out_close: |