提交 f36b9ddb 编写于 作者: C Chanwoo Choi 提交者: Anton Vorontsov

charger-manager: Fix bug when check dropped voltage after fullbatt event

This patch check difference value between current voltage of battery and
desc->fullbatt_uV whether positve or negative number. If difference value
is negative number when current voltage of battery is larger than
desc->fullbatt_uV, charger-manager return immediately because battery is
fully charged.
Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: NMyungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
上级 0fa11dbc
......@@ -482,8 +482,9 @@ static void fullbatt_vchk(struct work_struct *work)
return;
}
diff = desc->fullbatt_uV;
diff -= batt_uV;
diff = desc->fullbatt_uV - batt_uV;
if (diff < 0)
return;
dev_info(cm->dev, "VBATT dropped %duV after full-batt.\n", diff);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册