mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-20 16:30:53 +00:00
max17042_battery: Handle irq request failure case
suspend/resume functions take action based upon the fuel gauge interrupt. If the rquest irq fails we should assign 0 to client->irq. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
parent
243e3527ff
commit
e5ba50bc3b
@ -706,9 +706,11 @@ static int __devinit max17042_probe(struct i2c_client *client,
|
||||
reg |= CONFIG_ALRT_BIT_ENBL;
|
||||
max17042_write_reg(client, MAX17042_CONFIG, reg);
|
||||
max17042_set_soc_threshold(chip, 1);
|
||||
} else
|
||||
} else {
|
||||
client->irq = 0;
|
||||
dev_err(&client->dev, "%s(): cannot get IRQ\n",
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
|
||||
reg = max17042_read_reg(chip->client, MAX17042_STATUS);
|
||||
|
Loading…
Reference in New Issue
Block a user