Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: mali-c55: free IRQ when remove while runtime-active
@ 2026-09-03  2:55 Li Youhong
  2026-09-04 10:12 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Li Youhong @ 2026-09-03  2:55 UTC (permalink / raw)
  To: dan.scally, jacopo.mondi, mchehab; +Cc: linux-media, Li Youhong

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-04 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03  2:55 [PATCH] media: mali-c55: free IRQ when remove while runtime-active Li Youhong
2026-09-04 10:12 ` Linus Walleij
2026-09-04 10:40   ` Jacopo Mondi
2026-09-04 14:55     ` Dan Scally

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox