diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-03-22 03:22:54 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-04-04 04:07:10 -0400 |
commit | 65c6f638d600181f66a6a5aa2e86a4162ca87a38 (patch) | |
tree | 93402f563b24eba923f38c74ef2541591addd468 | |
parent | 58c92990cc2798da8c6c795a37248695d960b3e3 (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>
-rw-r--r-- | drivers/rtc/rtc-sun4v.c | 11 |
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: | |||
39 | 39 | ||
40 | static int sun4v_read_time(struct device *dev, struct rtc_time *tm) | 40 | static int sun4v_read_time(struct device *dev, struct rtc_time *tm) |
41 | { | 41 | { |
42 | rtc_time_to_tm(hypervisor_get_time(), tm); | 42 | rtc_time64_to_tm(hypervisor_get_time(), tm); |
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
45 | 45 | ||
@@ -66,14 +66,7 @@ retry: | |||
66 | 66 | ||
67 | static int sun4v_set_time(struct device *dev, struct rtc_time *tm) | 67 | static int sun4v_set_time(struct device *dev, struct rtc_time *tm) |
68 | { | 68 | { |
69 | unsigned long secs; | 69 | return hypervisor_set_time(rtc_tm_to_time64(tm)); |
70 | int err; | ||
71 | |||
72 | err = rtc_tm_to_time(tm, &secs); | ||
73 | if (err) | ||
74 | return err; | ||
75 | |||
76 | return hypervisor_set_time(secs); | ||
77 | } | 70 | } |
78 | 71 | ||
79 | static const struct rtc_class_ops sun4v_rtc_ops = { | 72 | static const struct rtc_class_ops sun4v_rtc_ops = { |