提交 1d220334 编写于 作者: A Anton Vorontsov

apm_power: Add missing break statement

The missing break statement causes wrong capacity calculation for
batteries that report energy.
Reported-by: Nd binderman <dcb314@hotmail.com>
Cc: <stable@kernel.org>
Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
上级 77f4b9fe
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册