apm_power: Add missing break statement
The missing break statement causes wrong capacity calculation for batteries that report energy. Reported-by: d binderman <dcb314@hotmail.com> Cc: <stable@kernel.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
This commit is contained in:
@@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_source source)
|
|||||||
empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
|
empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
|
||||||
now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
|
now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
|
||||||
avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
|
avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
|
||||||
|
break;
|
||||||
case SOURCE_VOLTAGE:
|
case SOURCE_VOLTAGE:
|
||||||
full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
|
full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
|
||||||
empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
|
empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
|
||||||
|
Reference in New Issue
Block a user