Skip to contentSkip to conversation

apm_power: Add missing break statement

PATCH New Anton Vorontsov 1 participant 1 message Sep 7, 2010

lore
Share & tools
lore

Anton Vorontsov

author Applied
#0 lore raw

PATCH 1/1 apm_power: Add missing break statement

The missing break statement causes wrong capacity calculation for batteries that report energy.

---

Applied to battery-2.6.36.git.

 drivers/power/apm_power.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/power/apm_power.c +1 -0
index 936bae5..dc628cb 100644
@@ -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;
Signature · 1 line
1.7.0.5