dect
/
linux-2.6
Archived
13
0
Fork 0

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: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
Chanwoo Choi 2012-11-22 16:53:51 +09:00 committed by Anton Vorontsov
parent 0fa11dbc23
commit f36b9ddbab
1 changed files with 3 additions and 2 deletions

View File

@ -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);