power: supply: sc27xx: prevent adc * 1000 from overflow
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Fri, 24 Jul 2020 12:21:48 +0000 (20:21 +0800)
committerSebastian Reichel <sre@kernel.org>
Mon, 27 Jul 2020 22:49:26 +0000 (00:49 +0200)
commitac31585fca317b29b6b7093a5a6775137a852f94
treed36f0900437996b1c0dd663ced1d2e2680754bb5
parentaf60459a543483c5ad155a92daa8c3a6c00a0829
power: supply: sc27xx: prevent adc * 1000 from overflow

The input parameter is int type, cause adc * 1000 could overflow.
Change to use s64 to avoid this issue.

Signed-off-by: Chen Yongzhi <yongzhi.chen@unisoc.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/sc27xx_fuel_gauge.c