All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind
@ 2026-12-04 22:45 Ihor Matushchak
  2026-12-04 22:56 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Ihor Matushchak @ 2026-12-04 22:45 UTC (permalink / raw)
  To: laurent.pinchart, mchehab, linux-media, imx, linux-arm-kernel
  Cc: Frank.Li, s.hauer, kernel, festevam, Ihor Matushchak

The async notifier completes every time when a remote subdev is unbound and
bound back. Skip media device registration if it's already registered to
avoid creating an additional /dev/media* node on each rebind.

Signed-off-by: Ihor Matushchak <ihor.matushchak@foobox.net>
---
 drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
index 2005584a1215..7c22413b1be7 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -90,6 +90,9 @@ static int mxc_isi_async_notifier_complete(struct v4l2_async_notifier *notifier)
 		return ret;
 	}
 
+	if (media_devnode_is_registered(isi->media_dev.devnode))
+		return 0;
+
 	return media_device_register(&isi->media_dev);
 }
 
-- 
2.53.0


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

end of thread, other threads:[~2026-12-04 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 22:45 [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind Ihor Matushchak
2026-12-04 22:56 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.