media: staging/imx: convert static vdev lists to list_head
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 15 Dec 2017 01:04:45 +0000 (20:04 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 15 Dec 2017 19:08:03 +0000 (14:08 -0500)
commitbd9d208a04e0db4f66255c24ff37e49069d274ee
tree183d393d1fb3215e215f6a3128cee7b714f70b15
parent9f6a0c59eba91c116f6cd7a487f4929faa07a7f8
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>
drivers/staging/media/imx/imx-media-capture.c
drivers/staging/media/imx/imx-media-dev.c
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media.h