]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
charger-manager: Use replacement variable to check state of battery
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 27 Jul 2012 05:01:37 +0000 (14:01 +0900)
committerAnton Vorontsov <anton.vorontsov@linaro.org>
Thu, 23 Aug 2012 03:09:08 +0000 (20:09 -0700)
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>
drivers/power/charger-manager.c
include/linux/power/charger-manager.h

index 240de49934f1d75dc8ebbbabc30726ab4068f670..cdf29d2eb7a587e3efce572c4014c609a5ff57ba 100644 (file)
@@ -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);
index cd22029e32aaf5adbd1b8136a3f48982705adbba..7d7b90fb7b4b4f9f000f4977ba4705645f992144 100644 (file)
@@ -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;