media: staging/imx: Improve pipeline searching
authorSteve Longerbeam <slongerbeam@gmail.com>
Fri, 10 May 2019 21:50:11 +0000 (17:50 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 28 May 2019 18:15:36 +0000 (14:15 -0400)
commit3ef46bc97ca2c918b7657a08220c7340a9bb07a2
tree2dc3355672c7c66085449f5e256a53d9e56c1ea0
parent6b8952db064480544a03d76601006f3eb9e89383
media: staging/imx: Improve pipeline searching

Export find_pipeline_pad(), renaming to imx_media_pipeline_pad(), and
extend its functionality to allow searching for video devices in the
enabled pipeline in addition to sub-devices.

As part of this:

- Rename imx_media_find_mipi_csi2_channel() to
  imx_media_pipeline_csi2_channel().

- Remove imx_media_find_upstream_pad(), it is redundant now.

- Rename imx_media_find_upstream_subdev() to imx_media_pipeline_subdev()
  with an additional boolean argument for searching upstream or downstream.

- Add imx_media_pipeline_video_device() which is analogous to
  imx_media_pipeline_subdev() but searches for video devices.

- Remove imxmd pointer arg from all of the functions above, it was
  never used in those functions. With that change the i.MX5/6 CSI,
  VDIC, and IC sub-devices no longer require the media_device.

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/imx/imx-ic-common.c
drivers/staging/media/imx/imx-ic-prp.c
drivers/staging/media/imx/imx-ic.h
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media-fim.c
drivers/staging/media/imx/imx-media-internal-sd.c
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media-vdic.c
drivers/staging/media/imx/imx-media.h
drivers/staging/media/imx/imx7-media-csi.c