diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-30 10:16:51 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-05-08 16:14:36 -0400 |
commit | a01ab0669ddf652f521630129e614c16542994b0 (patch) | |
tree | fb5d556e8286f1d188ddc3c7d97d344c7ea1bd1f | |
parent | f5fae395663a47e7cdfa37c36cf6689f495c4ab2 (diff) |
rtc: drop set_mms and set_mmss64
There are no users of set_mms and set_mmss64 as they have all been
converted to set_time and are handling the tm to time conversion on their
own.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r-- | drivers/rtc/interface.c | 6 | ||||
-rw-r--r-- | drivers/rtc/systohc.c | 6 | ||||
-rw-r--r-- | include/linux/rtc.h | 2 |
3 files changed, 1 insertions, 13 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: |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 48d3f8e0b64f..df666cf29ef1 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -79,8 +79,6 @@ struct rtc_class_ops { | |||
79 | int (*read_alarm)(struct device *, struct rtc_wkalrm *); | 79 | int (*read_alarm)(struct device *, struct rtc_wkalrm *); |
80 | int (*set_alarm)(struct device *, struct rtc_wkalrm *); | 80 | int (*set_alarm)(struct device *, struct rtc_wkalrm *); |
81 | int (*proc)(struct device *, struct seq_file *); | 81 | int (*proc)(struct device *, struct seq_file *); |
82 | int (*set_mmss64)(struct device *, time64_t secs); | ||
83 | int (*set_mmss)(struct device *, unsigned long secs); | ||
84 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); | 82 | int (*alarm_irq_enable)(struct device *, unsigned int enabled); |
85 | int (*read_offset)(struct device *, long *offset); | 83 | int (*read_offset)(struct device *, long *offset); |
86 | int (*set_offset)(struct device *, long offset); | 84 | int (*set_offset)(struct device *, long offset); |