Commit 65c6f638 authored by Alexandre Belloni's avatar Alexandre Belloni

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: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 58c92990
...@@ -39,7 +39,7 @@ static unsigned long hypervisor_get_time(void) ...@@ -39,7 +39,7 @@ static unsigned long hypervisor_get_time(void)
static int sun4v_read_time(struct device *dev, struct rtc_time *tm) 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; return 0;
} }
...@@ -66,14 +66,7 @@ static int hypervisor_set_time(unsigned long secs) ...@@ -66,14 +66,7 @@ static int hypervisor_set_time(unsigned long secs)
static int sun4v_set_time(struct device *dev, struct rtc_time *tm) static int sun4v_set_time(struct device *dev, struct rtc_time *tm)
{ {
unsigned long secs; return hypervisor_set_time(rtc_tm_to_time64(tm));
int err;
err = rtc_tm_to_time(tm, &secs);
if (err)
return err;
return hypervisor_set_time(secs);
} }
static const struct rtc_class_ops sun4v_rtc_ops = { static const struct rtc_class_ops sun4v_rtc_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment