]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit11e19706c4811873dca4f8c44b16f1b63c5aabc8
tree12ba54a74fd8882bf5961fe316d8b532a133fb2c
parent5f48fa622828075692053802cfa78668f32e5ae6
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