[PATCH 2/3] Input: sun4i-lradc-keys - clear the wake IRQ on unbind
Prasanth R
ragaprasanth at gmail.com
Tue Nov 24 23:21:23 PST 2026
From: Prasanth R <ragaprasanth at gmail.com>
The driver has no remove callback, so the wake IRQ set with
dev_pm_set_wake_irq() is never released on unbind.
When the driver is bound again, dev_pm_set_wake_irq() finds the old wake
IRQ, warns "wake irq already initialized" and returns -EEXIST, so the
driver warns that it failed to set the wake IRQ.
Use devm_pm_set_wake_irq() so the wake IRQ is released on unbind.
Compile-tested only.
I used an AI assistant (Claude) to find this and write the change.
Fixes: b243018eafeb ("Input: sun4i-lradc-keys - add wakeup support")
Signed-off-by: Prasanth R <prasanth.r at lineo.co.jp>
---
drivers/input/keyboard/sun4i-lradc-keys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
index 05983db3f..eea04d27e 100644
--- a/drivers/input/keyboard/sun4i-lradc-keys.c
+++ b/drivers/input/keyboard/sun4i-lradc-keys.c
@@ -321,7 +321,7 @@ static int sun4i_lradc_probe(struct platform_device *pdev)
return error;
if (device_property_read_bool(dev, "wakeup-source")) {
- error = dev_pm_set_wake_irq(dev, irq);
+ error = devm_pm_set_wake_irq(dev, irq);
if (error)
dev_warn(dev,
"Failed to set IRQ %d as a wake IRQ: %d\n",
--
2.43.0
More information about the linux-arm-kernel
mailing list