power: supply: core: Use library interpolation
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 16 Nov 2021 23:02:33 +0000 (00:02 +0100)
committerSebastian Reichel <sre@kernel.org>
Wed, 17 Nov 2021 16:44:41 +0000 (17:44 +0100)
commita4585ba2050f460f749bbaf2b67bd56c41e30283
treee5ee4b727cbf6a2bc11713865171cd417cf4b175
parent715ecbc10d6a77cce1c3bec8ba10e59be5233b4f
power: supply: core: Use library interpolation

The power supply core appears to contain two open coded
linear interpolations. Use the kernel fixpoint arithmetic
interpolation library function instead.

Cc: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_core.c