summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/v4l2-mc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-02-15 05:27:20 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-03-11 11:59:52 +0100
commitdbedd2f4901e8e86f78d30b7f586a1987d83a69e (patch)
tree64f5597dc105df552d5b96ce366cbabcd4a6430e /drivers/media/v4l2-core/v4l2-mc.c
parent42849cf0869fc8df5fa7c9cfdbd7dceb59d0f93a (diff)
downloadlinux-dbedd2f4901e8e86f78d30b7f586a1987d83a69e.tar.bz2
media: v4l2-mc: Add link flags to v4l2_create_fwnode_links_to_pad()
Add a flags argument to the v4l2_create_fwnode_links_to_pad() function to specify the link flags. This allows drivers to create immutable links for instance. 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/media/v4l2-core/v4l2-mc.c')
-rw-r--r--drivers/media/v4l2-core/v4l2-mc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
index ba2f2b8dcc8c..cba3d8e0bc4a 100644
--- a/drivers/media/v4l2-core/v4l2-mc.c
+++ b/drivers/media/v4l2-core/v4l2-mc.c
@@ -310,7 +310,7 @@ int v4l_vb2q_enable_media_source(struct vb2_queue *q)
EXPORT_SYMBOL_GPL(v4l_vb2q_enable_media_source);
int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
- struct media_pad *sink)
+ struct media_pad *sink, u32 flags)
{
struct fwnode_handle *endpoint;
struct v4l2_subdev *sink_sd;
@@ -367,7 +367,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
sink_sd->entity.name, sink_idx);
ret = media_create_pad_link(&src_sd->entity, src_idx,
- &sink_sd->entity, sink_idx, 0);
+ &sink_sd->entity, sink_idx, flags);
if (ret) {
dev_err(sink_sd->dev,
"link %s:%d -> %s:%d failed with %d\n",
@@ -395,7 +395,7 @@ int v4l2_create_fwnode_links(struct v4l2_subdev *src_sd,
if (!(pad->flags & MEDIA_PAD_FL_SINK))
continue;
- ret = v4l2_create_fwnode_links_to_pad(src_sd, pad);
+ ret = v4l2_create_fwnode_links_to_pad(src_sd, pad, 0);
if (ret)
return ret;
}