diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-02-15 05:26:44 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-03-11 11:59:48 +0100 |
commit | 49e1b5d6492b6b71a4dd3e20d6c2f84be91f830f (patch) | |
tree | f4d2277ac8a29e20619c563905b3d4a62b71782e /drivers/staging/media/imx/imx-media-dev-common.c | |
parent | media: imx: capture: Rename ioctl operations with legacy prefix (diff) | |
download | linux-dev-49e1b5d6492b6b71a4dd3e20d6c2f84be91f830f.tar.xz linux-dev-49e1b5d6492b6b71a4dd3e20d6c2f84be91f830f.zip |
media: imx: capture: Add a mechanism to disable control inheritance
Add a parameter to the imx_media_capture_device_init() function to
select between the legacy and MC-centric API. When selecting the
MC-centric API, the video node doesn't inherit controls from subdevs
anymore. All callers are updated to use the legacy API for now,
preserving the existing behaviour.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx/imx-media-dev-common.c')
-rw-r--r-- | drivers/staging/media/imx/imx-media-dev-common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-media-dev-common.c b/drivers/staging/media/imx/imx-media-dev-common.c index 5fe4b22ab847..d186179388d0 100644 --- a/drivers/staging/media/imx/imx-media-dev-common.c +++ b/drivers/staging/media/imx/imx-media-dev-common.c @@ -287,6 +287,8 @@ static int imx_media_link_notify(struct media_link *link, u32 flags, !(flags & MEDIA_LNK_FL_ENABLED)) { list_for_each_entry(pad_vdev, pad_vdev_list, list) { vfd = pad_vdev->vdev->vfd; + if (!vfd->ctrl_handler) + continue; dev_dbg(imxmd->md.dev, "reset controls for %s\n", vfd->entity.name); @@ -297,6 +299,8 @@ static int imx_media_link_notify(struct media_link *link, u32 flags, (link->flags & MEDIA_LNK_FL_ENABLED)) { list_for_each_entry(pad_vdev, pad_vdev_list, list) { vfd = pad_vdev->vdev->vfd; + if (!vfd->ctrl_handler) + continue; dev_dbg(imxmd->md.dev, "refresh controls for %s\n", vfd->entity.name); |