From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH 6/8] rtc: ep93xx: use .set_time
Date: Fri, 19 Apr 2019 10:00:03 +0200 [thread overview]
Message-ID: <20190419080005.16138-6-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20190419080005.16138-1-alexandre.belloni@bootlin.com>
Use .set_time instead of the deprecated .set_mmss.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-ep93xx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-ep93xx.c b/drivers/rtc/rtc-ep93xx.c
index 60e390c6ef06..a243bd85b842 100644
--- a/drivers/rtc/rtc-ep93xx.c
+++ b/drivers/rtc/rtc-ep93xx.c
@@ -63,9 +63,10 @@ static int ep93xx_rtc_read_time(struct device *dev, struct rtc_time *tm)
return 0;
}
-static int ep93xx_rtc_set_mmss(struct device *dev, unsigned long secs)
+static int ep93xx_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct ep93xx_rtc *ep93xx_rtc = dev_get_platdata(dev);
+ unsigned long secs = rtc_tm_to_time64(tm);
writel(secs + 1, ep93xx_rtc->mmio_base + EP93XX_RTC_LOAD);
return 0;
@@ -85,7 +86,7 @@ static int ep93xx_rtc_proc(struct device *dev, struct seq_file *seq)
static const struct rtc_class_ops ep93xx_rtc_ops = {
.read_time = ep93xx_rtc_read_time,
- .set_mmss = ep93xx_rtc_set_mmss,
+ .set_time = ep93xx_rtc_set_time,
.proc = ep93xx_rtc_proc,
};
--
2.20.1
next prev parent reply other threads:[~2019-04-19 19:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-19 7:59 [PATCH 1/8] rtc: ep93xx: stop setting platform_data Alexandre Belloni
2019-04-19 7:59 ` [PATCH 2/8] rtc: ep93xx: convert to devm_rtc_allocate_device Alexandre Belloni
2019-04-19 8:00 ` [PATCH 3/8] rtc: ep93xx: use rtc_add_group Alexandre Belloni
2019-04-19 8:00 ` [PATCH 4/8] rtc: ep93xx: set range Alexandre Belloni
2019-04-19 8:00 ` [PATCH 5/8] rtc: ep93xx: switch to rtc_time64_to_tm Alexandre Belloni
2019-04-19 8:00 ` Alexandre Belloni [this message]
2019-04-19 8:00 ` [PATCH 7/8] rtc: ep93xx: convert to SPDX identifier Alexandre Belloni
2019-04-19 8:00 ` [PATCH 8/8] rtc: ep93xx: fix checkpatch issues Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190419080005.16138-6-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).