summaryrefslogtreecommitdiff
path: root/arch/mips/sibyte/swarm/rtc_xicor1241.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2018-05-07 12:28:27 +0300
committerJames Hogan <jhogan@kernel.org>2018-05-15 01:58:23 +0300
commit09adad17191942cac01ccfbb897b976ac8f42c22 (patch)
tree779d55a325e59896c032ce5591db659ad6378ed2 /arch/mips/sibyte/swarm/rtc_xicor1241.c
parentd7c72c57b144997241f6933b6548ea86ced1b844 (diff)
downloadlinux-09adad17191942cac01ccfbb897b976ac8f42c22.tar.xz
MIPS: Convert read_persistent_clock() to read_persistent_clock64()
Since struct timespec is not y2038 safe on 32bit machines, this patch converts read_persistent_clock() to read_persistent_clock64() using struct timespec64, as well as converting mktime() to mktime64(). Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Huacai Chen <chenhc@lemote.com> Cc: Paul Burton <paul.burton@mips.com> Cc: linux-mips@linux-mips.org Signed-off-by: James Hogan <jhogan@kernel.org>
Diffstat (limited to 'arch/mips/sibyte/swarm/rtc_xicor1241.c')
-rw-r--r--arch/mips/sibyte/swarm/rtc_xicor1241.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/sibyte/swarm/rtc_xicor1241.c b/arch/mips/sibyte/swarm/rtc_xicor1241.c
index 50a82c495427..a2121c1345a9 100644
--- a/arch/mips/sibyte/swarm/rtc_xicor1241.c
+++ b/arch/mips/sibyte/swarm/rtc_xicor1241.c
@@ -168,7 +168,7 @@ int xicor_set_time(unsigned long t)
return 0;
}
-unsigned long xicor_get_time(void)
+time64_t xicor_get_time(void)
{
unsigned int year, mon, day, hour, min, sec, y2k;
unsigned long flags;
@@ -201,7 +201,7 @@ unsigned long xicor_get_time(void)
year += (y2k * 100);
- return mktime(year, mon, day, hour, min, sec);
+ return mktime64(year, mon, day, hour, min, sec);
}
int xicor_probe(void)