aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2012-11-22 02:53:51 -0500
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-12-17 01:45:58 -0500
commitf36b9ddbab408f5f5ed9105d857189b84337af48 (patch)
tree3bb1a850b2c66f2702d4f438fb7d5915f7180738 /drivers/power
parent0fa11dbc234268c4160b81f67220308dea3c156a (diff)
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>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/charger-manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index 633e41ca49ac..6ba047f5ac2c 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -482,8 +482,9 @@ static void fullbatt_vchk(struct work_struct *work)
482 return; 482 return;
483 } 483 }
484 484
485 diff = desc->fullbatt_uV; 485 diff = desc->fullbatt_uV - batt_uV;
486 diff -= batt_uV; 486 if (diff < 0)
487 return;
487 488
488 dev_info(cm->dev, "VBATT dropped %duV after full-batt.\n", diff); 489 dev_info(cm->dev, "VBATT dropped %duV after full-batt.\n", diff);
489 490