From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Support Opensource <support.opensource@diasemi.com>,
linux-renesas-soc@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH 2/2] rtc: da9063: switch to rtc_time64_to_tm/rtc_tm_to_time64
Date: Thu, 21 Mar 2019 11:15:57 +0100 [thread overview]
Message-ID: <20190321101557.26857-2-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20190321101557.26857-1-alexandre.belloni@bootlin.com>
Call the 64bit versions of rtc_tm time conversion now that the range is
enforced by the core.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
drivers/rtc/rtc-da9063.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
index b7052156e851..1b792bcea3c7 100644
--- a/drivers/rtc/rtc-da9063.c
+++ b/drivers/rtc/rtc-da9063.c
@@ -239,8 +239,8 @@ static int da9063_rtc_read_time(struct device *dev, struct rtc_time *tm)
da9063_data_to_tm(data, tm, rtc);
- rtc_tm_to_time(tm, &tm_secs);
- rtc_tm_to_time(&rtc->alarm_time, &al_secs);
+ tm_secs = rtc_tm_to_time64(tm);
+ al_secs = rtc_tm_to_time64(&rtc->alarm_time);
/* handle the rtc synchronisation delay */
if (rtc->rtc_sync == true && al_secs - tm_secs == 1)
--
2.20.1
next prev parent reply other threads:[~2019-03-21 10:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-21 10:15 [PATCH 1/2] rtc: da9063: set range Alexandre Belloni
2019-03-21 10:15 ` Alexandre Belloni [this message]
2019-03-22 15:28 ` [PATCH 2/2] rtc: da9063: switch to rtc_time64_to_tm/rtc_tm_to_time64 Steve Twiss
2019-04-01 8:43 ` Wolfram Sang
2019-04-01 12:42 ` Steve Twiss
2019-03-22 15:16 ` [PATCH 1/2] rtc: da9063: set range Steve Twiss
2019-04-01 8:41 ` Wolfram Sang
2019-04-01 8:59 ` Geert Uytterhoeven
2019-04-01 12:39 ` Steve Twiss
2019-04-01 12:42 ` Geert Uytterhoeven
2019-04-01 13:00 ` Steve Twiss
2019-04-01 13:21 ` Wolfram Sang
2019-04-01 13:39 ` Geert Uytterhoeven
2019-04-01 15:07 ` Wolfram Sang
2019-04-01 15:16 ` Alexandre Belloni
2019-04-01 15:52 ` Wolfram Sang
2019-04-01 18:53 ` Alexandre Belloni
2019-04-01 19:34 ` Wolfram Sang
2019-04-02 8:53 ` Alexandre Belloni
2019-04-02 9:33 ` Wolfram Sang
2019-04-02 9:51 ` Alexandre Belloni
2019-04-02 10:33 ` Steve Twiss
2019-04-02 10:42 ` Alexandre Belloni
2019-04-02 11:14 ` Wolfram Sang
2019-04-02 11:52 ` Steve Twiss
2019-04-02 9:37 ` Steve Twiss
2019-04-02 10:30 ` Wolfram Sang
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=20190321101557.26857-2-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=support.opensource@diasemi.com \
--cc=wsa+renesas@sang-engineering.com \
/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