diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-04-23 10:36:40 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-06-03 12:43:33 +0200 |
commit | 5bfd643583b2e2a203163fd6b617cd9027054200 (patch) | |
tree | 7a7e9fc47a94b2288ecb823efebe5c89e408e27d /arch/powerpc/kernel/time.c | |
parent | powerpc: rtas: clean up time handling (diff) | |
download | linux-5bfd643583b2e2a203163fd6b617cd9027054200.tar.xz linux-5bfd643583b2e2a203163fd6b617cd9027054200.zip |
powerpc: use time64_t in read_persistent_clock
Looking through the remaining users of the deprecated mktime()
function, I found the powerpc rtc handlers, which use it in
place of rtc_tm_to_time64().
To clean this up, I'm changing over the read_persistent_clock()
function to the read_persistent_clock64() variant, and change
all the platform specific handlers along with it.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r-- | arch/powerpc/kernel/time.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index ed6b2abdde15..da06a4d84ae2 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c @@ -825,7 +825,7 @@ int update_persistent_clock(struct timespec now) return ppc_md.set_rtc_time(&tm); } -static void __read_persistent_clock(struct timespec *ts) +static void __read_persistent_clock(struct timespec64 *ts) { struct rtc_time tm; static int first = 1; @@ -849,11 +849,10 @@ static void __read_persistent_clock(struct timespec *ts) } ppc_md.get_rtc_time(&tm); - ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, - tm.tm_hour, tm.tm_min, tm.tm_sec); + ts->tv_sec = rtc_tm_to_time64(&tm); } -void read_persistent_clock(struct timespec *ts) +void read_persistent_clock64(struct timespec64 *ts) { __read_persistent_clock(ts); |