From: Hongyan Xu <getshell@seu.edu.cn>
To: myungjoo.ham@samsung.com, cw00.choi@samsung.com
Cc: linux-kernel@vger.kernel.org, jianhao.xu@seu.edu.cn, getshell@seu.edu.cn
Subject: [PATCH] extcon: adc-jack: cancel delayed work on remove
Date: Sun, 19 Jul 2026 22:43:43 +0800 [thread overview]
Message-ID: <20260719144343.1161-1-getshell@seu.edu.cn> (raw)
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
reply other threads:[~2026-07-19 14:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260719144343.1161-1-getshell@seu.edu.cn \
--to=getshell@seu.edu.cn \
--cc=cw00.choi@samsung.com \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®