aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2014-02-27 09:12:39 +0800
committerAlex Shi <alex.shi@linaro.org>2014-02-27 09:12:39 +0800
commit0a92210a812d913cfb99cb959ec75f27473af664 (patch)
tree76c3acbdae4c61e0828701f36445eb287314a721 /drivers/power
parent04eec8da27b98e3f8c370661a6b1e81c63950134 (diff)
parent61dde96f97bb5b1ed4c11caf9a857d55ad8f6e17 (diff)
downloadlinaro-lsk-0a92210a812d913cfb99cb959ec75f27473af664.tar.gz
Merge tag 'v3.10.32' into linux-linaro-lsk
This is the 3.10.32 stable release
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max17040_battery.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/max17040_battery.c b/drivers/power/max17040_battery.c
index c7ff6d67f15..0fbac861080 100644
--- a/drivers/power/max17040_battery.c
+++ b/drivers/power/max17040_battery.c
@@ -148,7 +148,7 @@ static void max17040_get_online(struct i2c_client *client)
{
struct max17040_chip *chip = i2c_get_clientdata(client);
- if (chip->pdata->battery_online)
+ if (chip->pdata && chip->pdata->battery_online)
chip->online = chip->pdata->battery_online();
else
chip->online = 1;
@@ -158,7 +158,8 @@ static void max17040_get_status(struct i2c_client *client)
{
struct max17040_chip *chip = i2c_get_clientdata(client);
- if (!chip->pdata->charger_online || !chip->pdata->charger_enable) {
+ if (!chip->pdata || !chip->pdata->charger_online
+ || !chip->pdata->charger_enable) {
chip->status = POWER_SUPPLY_STATUS_UNKNOWN;
return;
}