summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/imx/imx-media-capture.c
diff options
context:
space:
mode:
authorSteve Longerbeam <slongerbeam@gmail.com>2017-12-14 20:04:45 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-15 14:08:03 -0500
commitbd9d208a04e0db4f66255c24ff37e49069d274ee (patch)
tree183d393d1fb3215e215f6a3128cee7b714f70b15 /drivers/staging/media/imx/imx-media-capture.c
parent9f6a0c59eba91c116f6cd7a487f4929faa07a7f8 (diff)
downloadlinux-bd9d208a04e0db4f66255c24ff37e49069d274ee.tar.gz
linux-bd9d208a04e0db4f66255c24ff37e49069d274ee.tar.bz2
linux-bd9d208a04e0db4f66255c24ff37e49069d274ee.zip
media: staging/imx: convert static vdev lists to list_head
Although not technically necessary because imx-media has only a maximum of 8 video devices, and once setup the video device lists are static, in anticipation of moving control ineritance to v4l2-core, make the vdev lists more generic by converting to dynamic list_head's. After doing that, 'struct imx_media_pad' is now just a list_head of video devices reachable from a pad. Allocate an array of list_head's, one list_head for each pad, and attach that array to sd->host_priv. An entry in the pad lists is of type 'struct imx_media_pad_vdev', and points to a video device from the master list. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging/media/imx/imx-media-capture.c')
-rw-r--r--drivers/staging/media/imx/imx-media-capture.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index 7b6763802db8..576bdc7e9c42 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -748,6 +748,8 @@ imx_media_capture_device_init(struct v4l2_subdev *src_sd, int pad)
vfd->queue = &priv->q;
priv->vdev.vfd = vfd;
+ INIT_LIST_HEAD(&priv->vdev.list);
+
video_set_drvdata(vfd, priv);
v4l2_ctrl_handler_init(&priv->ctrl_hdlr, 0);