[<prev] [next>] [day] [month] [year] [list]
Message-id: <1343365297-3530-1-git-send-email-cw00.choi@samsung.com>
Date: Fri, 27 Jul 2012 14:01:37 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: anton.vorontsov@...aro.org
Cc: cbouatmailru@...il.com, jenny.tc@...el.com,
ramakrishna.pallala@...el.com, myungjoo.ham@...sung.com,
kyungmin.park@...sung.com, linux-kernel@...r.kernel.org,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: [PATCH 2/2] charger-manager: Use replacement variable to check state
of battery
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@...sung.com>
Signed-off-by: Myungjoo Ham <myungjoo.ham@...sung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
---
drivers/power/charger-manager.c | 2 +-
include/linux/power/charger-manager.h | 3 ---
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index 240de49..cdf29d2 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -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);
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index cd22029..7d7b90f 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -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
@@ -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;
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists