Skip to content

Commit

Permalink
apm_power: Add missing break statement
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
enomsg committed Sep 8, 2010
1 parent 77f4b9f commit 1d22033
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/apm_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ static int calculate_capacity(enum apm_source source)
empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
break;
case SOURCE_VOLTAGE:
full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
Expand Down

0 comments on commit 1d22033

Please sign in to comment.