From: "Li Youhong" <dayou5941@163.com>
To: dan.scally@ideasonboard.com, jacopo.mondi@ideasonboard.com,
mchehab@kernel.org
Cc: linux-media@vger.kernel.org, Li Youhong <liyouhong@kylinos.cn>
Subject: [PATCH] media: mali-c55: free IRQ when remove while runtime-active
Date: Thu, 3 Sep 2026 10:55:26 +0800 [thread overview]
Message-ID: <20260903025526.2657105-1-dayou5941@163.com> (raw)
From: Li Youhong <liyouhong@kylinos.cn>
The IRQ is requested in runtime_resume() and released in
runtime_suspend(). remove() powers the device off when it is still
runtime-active, but does not free the IRQ.
If the driver is unbound while streaming (or otherwise runtime-active
after a successful resume), the threaded IRQ handler remains registered
against a powered-off device.
Free the IRQ in remove() the same way runtime_suspend() does.
Fixes: 2c9b9bcc2569 ("media: mali-c55: Power-off the peripheral in remove()")
Signed-off-by: Li Youhong <liyouhong@kylinos.cn>
---
drivers/media/platform/arm/mali-c55/mali-c55-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-core.c b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
index f28e9f4354ac..2f6658a2ac15 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-core.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-core.c
@@ -861,6 +861,8 @@ static void mali_c55_remove(struct platform_device *pdev)
mali_c55_media_frameworks_deinit(mali_c55);
if (!pm_runtime_suspended(&pdev->dev)) {
+ if (irq_has_action(mali_c55->irqnum))
+ free_irq(mali_c55->irqnum, &pdev->dev);
__mali_c55_power_off(mali_c55);
pm_runtime_set_suspended(&pdev->dev);
}
--
2.25.1
next reply other threads:[~2026-09-03 2:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 2:55 Li Youhong [this message]
2026-09-04 10:12 ` [PATCH] media: mali-c55: free IRQ when remove while runtime-active Linus Walleij
2026-09-04 10:40 ` Jacopo Mondi
2026-09-04 14:55 ` Dan Scally
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=20260903025526.2657105-1-dayou5941@163.com \
--to=dayou5941@163.com \
--cc=dan.scally@ideasonboard.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=liyouhong@kylinos.cn \
--cc=mchehab@kernel.org \
/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