projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
77f4b9f
)
apm_power: Add missing break statement
author
Anton Vorontsov
<cbouatmailru@gmail.com>
Tue, 7 Sep 2010 20:10:26 +0000
(
00:10
+0400)
committer
Anton Vorontsov
<cbouatmailru@gmail.com>
Wed, 8 Sep 2010 10:35:10 +0000
(14:35 +0400)
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>
drivers/power/apm_power.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/power/apm_power.c
b/drivers/power/apm_power.c
index 936bae560fa1f730255bde8a94c9493c953efdfd..dc628cb2e762803b6f3374d33a99feae5b08640c 100644
(file)
--- 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;