Skip to content

Commit

Permalink
media: exynos4-is: don't rely on the v4l2_async_subdev internals
Browse files Browse the repository at this point in the history
[ Upstream commit f98a5c2 ]

Commit 1f391df ("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: fa91f10 ("[media] exynos4-is: Add support for asynchronous subdevices registration")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
mszyprow authored and gregkh committed Dec 31, 2022
1 parent 3a54b72 commit 5d68a8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/media/platform/samsung/exynos4-is/media-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d68a8c

Please sign in to comment.