Message ID | 20230317225707.1552512-5-sre@kernel.org |
---|---|
State | Accepted |
Commit | 44263f50065969f2344808388bd589740f026167 |
Headers | show |
Series | Add DT support for generic ADC battery | expand |
diff --git a/drivers/power/supply/generic-adc-battery.c b/drivers/power/supply/generic-adc-battery.c index 917bd2a6cc52..535972a332b3 100644 --- a/drivers/power/supply/generic-adc-battery.c +++ b/drivers/power/supply/generic-adc-battery.c @@ -136,6 +136,9 @@ static int read_channel(struct gab *adc_bat, enum power_supply_property psp, result); if (ret < 0) pr_err("read channel error\n"); + else + *result *= 1000; + return ret; }