diff options
author | Alex Shi <alex.shi@linaro.org> | 2014-02-27 09:12:39 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2014-02-27 09:12:39 +0800 |
commit | 0a92210a812d913cfb99cb959ec75f27473af664 (patch) | |
tree | 76c3acbdae4c61e0828701f36445eb287314a721 /drivers/power | |
parent | 04eec8da27b98e3f8c370661a6b1e81c63950134 (diff) | |
parent | 61dde96f97bb5b1ed4c11caf9a857d55ad8f6e17 (diff) |
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.c | 5 |
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; } |