public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] apm_power: Add missing break statement
@ 2010-09-07 20:28 Anton Vorontsov
  0 siblings, 0 replies; only message in thread
From: Anton Vorontsov @ 2010-09-07 20:28 UTC (permalink / raw)
  To: linux-kernel; +Cc: d binderman, dwmw2

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

Reported-by: d binderman <dcb314@hotmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
---

Applied to battery-2.6.36.git.

 drivers/power/apm_power.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c
index 936bae5..dc628cb 100644
--- a/drivers/power/apm_power.c
+++ b/drivers/power/apm_power.c
@@ -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;
-- 
1.7.0.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-07 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 20:28 [PATCH] apm_power: Add missing break statement Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox