power: supply: ab8500: stop using getnstimeofday64()
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 Jun 2018 14:23:29 +0000 (16:23 +0200)
committerSebastian Reichel <sre@kernel.org>
Fri, 6 Jul 2018 14:58:02 +0000 (16:58 +0200)
commit8b0d62d49aea991016d1a2e072e6af0a813b4a2d
tree12ba54a74fd8882bf5961fe316d8b532a133fb2c
parente6a578e2890dcedf1b5722d5bead9cad2e0d9195
power: supply: ab8500: stop using getnstimeofday64()

getnstimeofday64() is deprecated in favor of the ktime_get() family.

The direct replacement would be ktime_get_real_ts64(), but we only need
the seconds value, and it seems better to use boottime than real time
to avoid unexpected behavior with a concurrent settimeofday().

ktime_get_seconds() might also work, but it seems better to use
boottime than monotonic time since I assume that the charging
process continues during suspend.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/supply/ab8500_fg.c