power: supply: collie: Fix wakeup source leaks on device unbind

[ Upstream commit c73d19f89cb03c43abbbfa3b9caa1b8fc719764c ]

Device can be unbound, so driver must also release memory for the wakeup
source.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250406202730.55096-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Krzysztof Kozlowski
2025-04-06 22:27:29 +02:00
committed by Greg Kroah-Hartman
parent 1c24a73897
commit 74f765e85d

View File

@@ -440,6 +440,7 @@ err_put_gpio_full:
static void collie_bat_remove(struct ucb1x00_dev *dev) static void collie_bat_remove(struct ucb1x00_dev *dev)
{ {
device_init_wakeup(&ucb->dev, 0);
free_irq(gpiod_to_irq(collie_bat_main.gpio_full), &collie_bat_main); free_irq(gpiod_to_irq(collie_bat_main.gpio_full), &collie_bat_main);
power_supply_unregister(collie_bat_bu.psy); power_supply_unregister(collie_bat_bu.psy);
power_supply_unregister(collie_bat_main.psy); power_supply_unregister(collie_bat_main.psy);