summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJonghwa Lee <jonghwa3.lee@samsung.com>2014-10-10 17:42:42 +0900
committerJonghwa Lee <jonghwa3.lee@samsung.com>2014-10-10 17:51:51 +0900
commitf3e7806e33b470f19ad053202cbf5c02d442640f (patch)
treee731daad282ad0ac9e3c3b08c53ad3dfe5b7b5b2 /include
parentc16c9f47a5ff27312c71bcceba7be975a1d4158c (diff)
downloadlinux-3.10-f3e7806e33b470f19ad053202cbf5c02d442640f.tar.gz
linux-3.10-f3e7806e33b470f19ad053202cbf5c02d442640f.tar.bz2
linux-3.10-f3e7806e33b470f19ad053202cbf5c02d442640f.zip
power: charger-manager: Add num_chargers variable to desc structure.
To confirm NULL point exception and also follow the common convention of 'for loop' control, fix the driver to use scalar variable, 'num_chargers' when it retrieves the power_supply pointer array. Change-Id: Iab834cf93822b1a03419ca9933e82d6396cc0474 Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/power/charger-manager.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h
index a61053f5706..b56366e96c4 100644
--- a/include/linux/power/charger-manager.h
+++ b/include/linux/power/charger-manager.h
@@ -148,6 +148,7 @@ struct charger_regulator {
* charger manager will monitor battery health
* @battery_present:
* Specify where information for existance of battery can be obtained
+ * @num_chargers: number of chargers associated with the battery
* @psy_charger_stat: the names of power-supply for chargers
* @num_charger_regulator: the number of entries in charger_regulators
* @charger_regulators: array of charger regulators
@@ -180,6 +181,7 @@ struct charger_desc {
enum data_source battery_present;
+ int num_chargers;
const char **psy_charger_stat;
int num_charger_regulators;