summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-sun4v.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-03-22 08:22:54 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-04-04 10:07:10 +0200
commit65c6f638d600181f66a6a5aa2e86a4162ca87a38 (patch)
tree93402f563b24eba923f38c74ef2541591addd468 /drivers/rtc/rtc-sun4v.c
parent58c92990cc2798da8c6c795a37248695d960b3e3 (diff)
rtc: sun4v: switch to rtc_time64_to_tm/rtc_tm_to_time64
Call the 64bit versions of rtc_tm time conversion as the hypervisor handles 64bit values. Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-sun4v.c')
-rw-r--r--drivers/rtc/rtc-sun4v.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-sun4v.c b/drivers/rtc/rtc-sun4v.c
index 11bc562eba5d..378081fffa91 100644
--- a/drivers/rtc/rtc-sun4v.c
+++ b/drivers/rtc/rtc-sun4v.c
@@ -39,7 +39,7 @@ retry:
static int sun4v_read_time(struct device *dev, struct rtc_time *tm)
{
- rtc_time_to_tm(hypervisor_get_time(), tm);
+ rtc_time64_to_tm(hypervisor_get_time(), tm);
return 0;
}
@@ -66,14 +66,7 @@ retry:
static int sun4v_set_time(struct device *dev, struct rtc_time *tm)
{
- unsigned long secs;
- int err;
-
- err = rtc_tm_to_time(tm, &secs);
- if (err)
- return err;
-
- return hypervisor_set_time(secs);
+ return hypervisor_set_time(rtc_tm_to_time64(tm));
}
static const struct rtc_class_ops sun4v_rtc_ops = {