summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/xilinx
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-12-16 11:32:26 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:19:19 -0200
commit08613c549ff5ac98d04d9dd28a4ffafa3918e2ca (patch)
tree2072605372631b068dfd004dc83b13ea88348448 /drivers/media/platform/xilinx
parentfd7e5309a5324c243cb285257a2e5e35d9bcaa56 (diff)
downloadtalos-obmc-linux-08613c549ff5ac98d04d9dd28a4ffafa3918e2ca.tar.gz
talos-obmc-linux-08613c549ff5ac98d04d9dd28a4ffafa3918e2ca.zip
[media] v4l: xilinx: Use the new media graph walk interface
The media graph walk requires initialisation and cleanup soon. Update the users to perform the soon necessary API calls. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Hyun Kwon <hyun.kwon@xilinx.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/xilinx')
-rw-r--r--drivers/media/platform/xilinx/xilinx-dma.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index 0181ff402a5a..7f6898b13cac 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -182,10 +182,17 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
struct media_device *mdev = entity->graph_obj.mdev;
unsigned int num_inputs = 0;
unsigned int num_outputs = 0;
+ int ret;
mutex_lock(&mdev->graph_mutex);
/* Walk the graph to locate the video nodes. */
+ ret = media_entity_graph_walk_init(&graph, entity->graph_obj.mdev);
+ if (ret) {
+ mutex_unlock(&mdev->graph_mutex);
+ return ret;
+ }
+
media_entity_graph_walk_start(&graph, entity);
while ((entity = media_entity_graph_walk_next(&graph))) {
@@ -206,6 +213,8 @@ static int xvip_pipeline_validate(struct xvip_pipeline *pipe,
mutex_unlock(&mdev->graph_mutex);
+ media_entity_graph_walk_cleanup(&graph);
+
/* We need exactly one output and zero or one input. */
if (num_outputs != 1 || num_inputs > 1)
return -EPIPE;
OpenPOWER on IntegriCloud