Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

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>

authored by

Krzysztof Kozlowski and committed by
Sebastian Reichel
c73d19f8 13b5a9e4

+1
+1
drivers/power/supply/collie_battery.c
··· 440 440 441 441 static void collie_bat_remove(struct ucb1x00_dev *dev) 442 442 { 443 + device_init_wakeup(&ucb->dev, 0); 443 444 free_irq(gpiod_to_irq(collie_bat_main.gpio_full), &collie_bat_main); 444 445 power_supply_unregister(collie_bat_bu.psy); 445 446 power_supply_unregister(collie_bat_main.psy);