diff options
author | Xunlei Pang <pang.xunlei@linaro.org> | 2015-06-12 11:10:18 +0800 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-06-25 01:13:43 +0200 |
commit | c86a6c28957a9e8e9a71582a32e96971ad411ffe (patch) | |
tree | 01da240268407d444b6a180ebe749eb1ad03756c | |
parent | 460ea8d70db1ffd9a5d6996c240c34458473334f (diff) | |
download | lwn-c86a6c28957a9e8e9a71582a32e96971ad411ffe.tar.gz lwn-c86a6c28957a9e8e9a71582a32e96971ad411ffe.zip |
rtc: interface: Remove rtc_set_mmss()
Now rtc_set_mmss() has no users, just remove it.
We still have rtc_set_time() doing similar things.
Signed-off-by: Xunlei Pang <pang.xunlei@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-rw-r--r-- | drivers/rtc/interface.c | 45 | ||||
-rw-r--r-- | include/linux/rtc.h | 1 |
2 files changed, 0 insertions, 46 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index a6b14c24d7e3..11b639067312 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -91,51 +91,6 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm) } EXPORT_SYMBOL_GPL(rtc_set_time); -int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs) -{ - int err; - - err = mutex_lock_interruptible(&rtc->ops_lock); - if (err) - return err; - - if (!rtc->ops) - err = -ENODEV; - else if (rtc->ops->set_mmss64) - err = rtc->ops->set_mmss64(rtc->dev.parent, secs); - else if (rtc->ops->set_mmss) - err = rtc->ops->set_mmss(rtc->dev.parent, secs); - else if (rtc->ops->read_time && rtc->ops->set_time) { - struct rtc_time new, old; - - err = rtc->ops->read_time(rtc->dev.parent, &old); - if (err == 0) { - rtc_time64_to_tm(secs, &new); - - /* - * avoid writing when we're going to change the day of - * the month. We will retry in the next minute. This - * basically means that if the RTC must not drift - * by more than 1 minute in 11 minutes. - */ - if (!((old.tm_hour == 23 && old.tm_min == 59) || - (new.tm_hour == 23 && new.tm_min == 59))) - err = rtc->ops->set_time(rtc->dev.parent, - &new); - } - } else { - err = -EINVAL; - } - - pm_stay_awake(rtc->dev.parent); - mutex_unlock(&rtc->ops_lock); - /* A timer might have just expired */ - schedule_work(&rtc->irqwork); - - return err; -} -EXPORT_SYMBOL_GPL(rtc_set_mmss); - static int rtc_read_alarm_internal(struct rtc_device *rtc, struct rtc_wkalrm *alarm) { int err; diff --git a/include/linux/rtc.h b/include/linux/rtc.h index b36160321458..3359f0422c6b 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -168,7 +168,6 @@ extern void devm_rtc_device_unregister(struct device *dev, extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); -extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); extern int rtc_set_ntp_time(struct timespec64 now); int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm); extern int rtc_read_alarm(struct rtc_device *rtc, |