Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ihor Matushchak <ihor.matushchak@foobox.net>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	Frank.Li@nxp.com, s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com
Subject: Re: [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind
Date: Sun, 6 Dec 2026 12:16:08 +0900	[thread overview]
Message-ID: <20261206031608.GA933703@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20261204224502.16170-1-ihor.matushchak@foobox.net>

On Fri, Dec 04, 2026 at 11:45:02PM +0100, Ihor Matushchak wrote:
> The async notifier completes every time when a remote subdev is unbound and
> bound back.

That's not something we support in the media subsystem at the moment.
There are plenty of object lifetime management issues, workarounds in
drivers is not the way to go.

> 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);
>  }
>  

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2026-12-06  3:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 22:45 [PATCH] media: nxp: imx8-isi: avoid duplicate media device on rebind Ihor Matushchak
2026-12-06  3:16 ` Laurent Pinchart [this message]

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=20261206031608.GA933703@killaraus.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Frank.Li@nxp.com \
    --cc=festevam@gmail.com \
    --cc=ihor.matushchak@foobox.net \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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