diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-01 17:25:31 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-01 17:25:31 -0800 |
commit | 5ad3cb0ed525b80c7f66c32b49a68c1f3510bec9 (patch) | |
tree | ade60b738d464921d1d61955998b162cf421b0b0 | |
parent | e613c90ddabcef5134ec4daa23b319ad7c99b94b (diff) | |
parent | 2df70149e73e79783bcbc7db4fa51ecef0e2022c (diff) | |
download | lwn-5ad3cb0ed525b80c7f66c32b49a68c1f3510bec9.tar.gz lwn-5ad3cb0ed525b80c7f66c32b49a68c1f3510bec9.zip |
Merge tag 'for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply fixes from Sebastian Reichel:
- Kconfig dependency fix
- bq27xxx-i2c: do not free non-existing IRQ
* tag 'for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
power: supply: bq27xxx-i2c: Do not free non existing IRQ
power: supply: mm8013: select REGMAP_I2C
-rw-r--r-- | drivers/power/supply/Kconfig | 1 | ||||
-rw-r--r-- | drivers/power/supply/bq27xxx_battery_i2c.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig index f21cb05815ec..3e31375491d5 100644 --- a/drivers/power/supply/Kconfig +++ b/drivers/power/supply/Kconfig @@ -978,6 +978,7 @@ config CHARGER_QCOM_SMB2 config FUEL_GAUGE_MM8013 tristate "Mitsumi MM8013 fuel gauge driver" depends on I2C + select REGMAP_I2C help Say Y here to enable the Mitsumi MM8013 fuel gauge driver. It enables the monitoring of many battery parameters, including diff --git a/drivers/power/supply/bq27xxx_battery_i2c.c b/drivers/power/supply/bq27xxx_battery_i2c.c index 3a1798b0c1a7..9910c600743e 100644 --- a/drivers/power/supply/bq27xxx_battery_i2c.c +++ b/drivers/power/supply/bq27xxx_battery_i2c.c @@ -209,7 +209,9 @@ static void bq27xxx_battery_i2c_remove(struct i2c_client *client) { struct bq27xxx_device_info *di = i2c_get_clientdata(client); - free_irq(client->irq, di); + if (client->irq) + free_irq(client->irq, di); + bq27xxx_battery_teardown(di); mutex_lock(&battery_mutex); |