diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-09-27 10:12:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-29 07:14:28 -0500 |
commit | 4e48afecd5ee3a394d228349fc1c33982e9fb557 (patch) | |
tree | fc426d70b6492b7e254d1c9dcaa550bc8ba79c02 /drivers/staging | |
parent | d651ff916ead5608753f6493dfa3d99ef6e01ab7 (diff) | |
download | linux-stable-4e48afecd5ee3a394d228349fc1c33982e9fb557.tar.gz linux-stable-4e48afecd5ee3a394d228349fc1c33982e9fb557.tar.bz2 linux-stable-4e48afecd5ee3a394d228349fc1c33982e9fb557.zip |
media: v4l2-async: simplify v4l2_async_subdev structure
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 <s.nawrocki@samsung.com>
Acked-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Hyun Kwon <hyun.kwon@xilinx.com>
Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/imx/imx-media-dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/imx/imx-media-dev.c b/drivers/staging/media/imx/imx-media-dev.c index 2800700482d6..f7ed5f506fa9 100644 --- a/drivers/staging/media/imx/imx-media-dev.c +++ b/drivers/staging/media/imx/imx-media-dev.c @@ -48,7 +48,7 @@ find_async_subdev(struct imx_media_dev *imxmd, asd = &imxasd->asd; switch (asd->match_type) { case V4L2_ASYNC_MATCH_FWNODE: - if (fwnode && asd->match.fwnode.fwnode == fwnode) + if (fwnode && asd->match.fwnode == fwnode) return asd; break; case V4L2_ASYNC_MATCH_DEVNAME: @@ -104,7 +104,7 @@ int imx_media_add_async_subdev(struct imx_media_dev *imxmd, if (fwnode) { asd->match_type = V4L2_ASYNC_MATCH_FWNODE; - asd->match.fwnode.fwnode = fwnode; + asd->match.fwnode = fwnode; } else { asd->match_type = V4L2_ASYNC_MATCH_DEVNAME; asd->match.device_name.name = devname; |