Message ID | 5c3bb516c6020410a932c12eb2481fd75c34b7fe.1564566425.git.baolin.wang@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/6] power: supply: sc27xx: Add POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN attribute | expand |
diff --git a/drivers/power/supply/sc27xx_fuel_gauge.c b/drivers/power/supply/sc27xx_fuel_gauge.c index f670131..fa85f40 100644 --- a/drivers/power/supply/sc27xx_fuel_gauge.c +++ b/drivers/power/supply/sc27xx_fuel_gauge.c @@ -915,6 +915,8 @@ static int sc27xx_fgu_hw_init(struct sc27xx_fgu_data *data) data->alarm_cap = power_supply_ocv2cap_simple(data->cap_table, data->table_len, data->min_volt); + if (!data->alarm_cap) + data->alarm_cap += 1; power_supply_put_battery_info(data->battery, &info);