From 4e48afecd5ee3a394d228349fc1c33982e9fb557 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 27 Sep 2017 10:12:00 -0400 Subject: media: v4l2-async: simplify v4l2_async_subdev structure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The V4L2_ASYNC_MATCH_FWNODE match criteria requires just one struct to be filled (struct fwnode_handle). The V4L2_ASYNC_MATCH_DEVNAME match criteria requires just a device name. So, it doesn't make sense to enclose those into structs, as the criteria can go directly into the union. That makes easier to document it, as we don't need to document weird senseless structs. At drivers, this makes even clearer about the match criteria. Acked-by: Sylwester Nawrocki Acked-by: Benoit Parrot Acked-by: Alexandre Belloni Acked-by: Sakari Ailus Acked-by: Philipp Zabel Acked-by: Hyun Kwon Acked-by: Niklas Söderlund Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos4-is/media-dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/platform/exynos4-is/media-dev.c') diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index 0ef583cfc424..78b48a1fa26c 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -456,7 +456,7 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd, } fmd->sensor[index].asd.match_type = V4L2_ASYNC_MATCH_FWNODE; - fmd->sensor[index].asd.match.fwnode.fwnode = of_fwnode_handle(rem); + fmd->sensor[index].asd.match.fwnode = of_fwnode_handle(rem); fmd->async_subdevs[index] = &fmd->sensor[index].asd; fmd->num_sensors++; @@ -1364,7 +1364,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.match.fwnode.fwnode == + if (fmd->sensor[i].asd.match.fwnode == of_fwnode_handle(subdev->dev->of_node)) si = &fmd->sensor[i]; -- cgit