Skip to content

Commit

Permalink
charger-manager: Use replacement variable to check state of battery
Browse files Browse the repository at this point in the history
This patch remove unnecessary variable(cm->fullbatt_vchk_uV) by using
'desc->fullbatt_uV' field directly in fullbatt_handler() function
to check the state of battery.

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>
  • Loading branch information
Chanwoo Choi authored and Anton Vorontsov committed Aug 23, 2012
1 parent dbb61fc commit fd65ee5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/power/charger-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static void fullbatt_vchk(struct work_struct *work)
return;
}

diff = cm->fullbatt_vchk_uV;
diff = desc->fullbatt_uV;
diff -= batt_uV;

dev_dbg(cm->dev, "VBATT dropped %duV after full-batt.\n", diff);
Expand Down
3 changes: 0 additions & 3 deletions include/linux/power/charger-manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ struct charger_desc {
* @charger_enabled: the state of charger
* @fullbatt_vchk_jiffies_at:
* jiffies at the time full battery check will occur.
* @fullbatt_vchk_uV: voltage in microvolt
* criteria for full battery
* @fullbatt_vchk_work: work queue for full battery check
* @emergency_stop:
* When setting true, stop charging
Expand All @@ -218,7 +216,6 @@ struct charger_manager {
bool charger_enabled;

unsigned long fullbatt_vchk_jiffies_at;
unsigned int fullbatt_vchk_uV;
struct delayed_work fullbatt_vchk_work;

int emergency_stop;
Expand Down

0 comments on commit fd65ee5

Please sign in to comment.