All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Scally <djrscally@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	linux-media@vger.kernel.org,
	'Linux Samsung SOC' <linux-samsung-soc@vger.kernel.org>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] media: exynos4-is: don't rely on the v4l2_async_subdev internals
Date: Fri, 23 Sep 2022 21:35:08 +0100	[thread overview]
Message-ID: <441b7031-bc23-e0ff-6a28-51796c920790@gmail.com> (raw)
In-Reply-To: <20220923094201.18047-1-m.szyprowski@samsung.com>

Hi Marek

On 23/09/2022 10:42, Marek Szyprowski wrote:
> Commit 1f391df44607 ("media: v4l2-async: Use endpoints in
> __v4l2_async_nf_add_fwnode_remote()") changed the data that is stored in
> the v4l2_async_subdev internals from the fwnode pointer to the parent
> device to the fwnode pointer to the matched endpoint. This broke the
> sensor matching code, which relied on the particular fwnode data in the
> v4l2_async_subdev internals. Fix this by simply matching the
> v4l2_async_subdev pointer, which is already available there.
>
> Reported-by: Daniel Scally <djrscally@gmail.com>
> Fixes: fa91f1056f17 ("[media] exynos4-is: Add support for asynchronous subdevices registration")
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---


Yeah that makes more sense to me:


Reviewed-by: Daniel Scally <djrscally@gmail.com>

>   drivers/media/platform/samsung/exynos4-is/media-dev.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/platform/samsung/exynos4-is/media-dev.c b/drivers/media/platform/samsung/exynos4-is/media-dev.c
> index 52b43ea04030..412213b0c384 100644
> --- a/drivers/media/platform/samsung/exynos4-is/media-dev.c
> +++ b/drivers/media/platform/samsung/exynos4-is/media-dev.c
> @@ -1380,9 +1380,7 @@ static int subdev_notifier_bound(struct v4l2_async_notifier *notifier,
>   
>   	/* Find platform data for this sensor subdev */
>   	for (i = 0; i < ARRAY_SIZE(fmd->sensor); i++)
> -		if (fmd->sensor[i].asd &&
> -		    fmd->sensor[i].asd->match.fwnode ==
> -		    of_fwnode_handle(subdev->dev->of_node))
> +		if (fmd->sensor[i].asd == asd)
>   			si = &fmd->sensor[i];
>   
>   	if (si == NULL)

  reply	other threads:[~2022-09-23 20:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220923094232eucas1p1deb3985c9637a0876609c75967175e9b@eucas1p1.samsung.com>
2022-09-23  9:42 ` [PATCH] media: exynos4-is: don't rely on the v4l2_async_subdev internals Marek Szyprowski
2022-09-23 20:35   ` Daniel Scally [this message]
2022-10-05 14:47   ` Sylwester Nawrocki
2022-11-08 14:14     ` Marek Szyprowski
2022-11-09  9:29       ` Sakari Ailus
2022-11-09 10:30         ` Marek Szyprowski

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=441b7031-bc23-e0ff-6a28-51796c920790@gmail.com \
    --to=djrscally@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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 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.