OSDN Git Service

m68k: Use read_persistent_clock64() consistently
authorArnd Bergmann <arnd@arndb.de>
Mon, 23 Apr 2018 08:52:28 +0000 (10:52 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 22 May 2018 08:31:51 +0000 (10:31 +0200)
commit065f109f2506d6b178555e3b2f0c91510211ee12
tree9cd1f3d175b1fb107dbe441a5b38535048e0578b
parentb65769fc013edb7c2e5fdcd91ea6124ad76168f5
m68k: Use read_persistent_clock64() consistently

We have two ways of getting the current time from a platform at boot
or during suspend: either using read_persistent_clock() or the rtc
class operation. We never need both, so I'm hiding the
read_persistent_clock variant when the generic RTC is enabled.

Since read_persistent_clock() and mktime() are deprecated because of
the y2038 overflow of time_t, we should use the time64_t based
replacements here.

Finally, the dependency on CONFIG_ARCH_USES_GETTIMEOFFSET looks
completely bogus in this case, so let's remove that. It was
added in commit b13b3f51ff7b ("m68k: fix inclusion of
arch_gettimeoffset for non-MMU 68k classic CPU types") to deal
with arch_gettimeoffset(), which has since been removed from
this file and is unrelated to the RTC functions.

The rtc accessors are only used by classic machines, while
coldfire uses proper RTC drivers, so we can put the old
ifdef back around both functions.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/kernel/time.c