* [PATCH] extcon: adc-jack: cancel delayed work on remove
@ 2026-07-19 14:43 Hongyan Xu
0 siblings, 0 replies; only message in thread
From: Hongyan Xu @ 2026-07-19 14:43 UTC (permalink / raw)
To: myungjoo.ham, cw00.choi; +Cc: linux-kernel, jianhao.xu, getshell
The IRQ handler queues handler as delayed work. The remove callback
passes its embedded work_struct to cancel_work_sync(), which cannot
cancel a pending delayed-work timer.
Free the IRQ to stop new queueing, then cancel the delayed work itself
before devres releases the containing object.
Signed-off-by: Hongyan Xu <getshell@seu.edu.cn>
---
drivers/extcon/extcon-adc-jack.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c
index 0317b61..25ee38d 100644
--- a/drivers/extcon/extcon-adc-jack.c
+++ b/drivers/extcon/extcon-adc-jack.c
@@ -163,7 +163,7 @@ static int adc_jack_remove(struct platform_device *pdev)
struct adc_jack_data *data = platform_get_drvdata(pdev);
free_irq(data->irq, data);
- cancel_work_sync(&data->handler.work);
+ cancel_delayed_work_sync(&data->handler);
return 0;
}
--
2.50.1.windows.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-19 14:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-19 14:43 [PATCH] extcon: adc-jack: cancel delayed work on remove Hongyan Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®