Commit 70c805c2 authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: ps3: switch to rtc_time64_to_tm/rtc_tm_to_time64

Call the 64bit versions of rtc_tm time conversion as the PS3 handles 64bit
values.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent be8bf986
...@@ -40,16 +40,13 @@ static u64 read_rtc(void) ...@@ -40,16 +40,13 @@ static u64 read_rtc(void)
static int ps3_get_time(struct device *dev, struct rtc_time *tm) static int ps3_get_time(struct device *dev, struct rtc_time *tm)
{ {
rtc_time_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm); rtc_time64_to_tm(read_rtc() + ps3_os_area_get_rtc_diff(), tm);
return 0; return 0;
} }
static int ps3_set_time(struct device *dev, struct rtc_time *tm) static int ps3_set_time(struct device *dev, struct rtc_time *tm)
{ {
unsigned long now; ps3_os_area_set_rtc_diff(rtc_tm_to_time64(tm) - read_rtc());
rtc_tm_to_time(tm, &now);
ps3_os_area_set_rtc_diff(now - read_rtc());
return 0; return 0;
} }
......
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