[media] v4l: vsp1: Use the new media graph walk interface
authorSakari Ailus <sakari.ailus@iki.fi>
Wed, 16 Dec 2015 13:32:27 +0000 (15:32 +0200)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 11 Jan 2016 14:19:19 +0000 (12:19 -0200)
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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vsp1/vsp1_video.c

index e3304303dce3f2a4fc04cb9b160f85cfb914cd9c..a6b1bd1225efe27bf07d61c4b176aebf1022f60d 100644 (file)
@@ -386,6 +386,12 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
        mutex_lock(&mdev->graph_mutex);
 
        /* Walk the graph to locate the entities and video nodes. */
+       ret = media_entity_graph_walk_init(&graph, 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))) {
@@ -419,6 +425,8 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
 
        mutex_unlock(&mdev->graph_mutex);
 
+       media_entity_graph_walk_cleanup(&graph);
+
        /* We need one output and at least one input. */
        if (pipe->num_inputs == 0 || !pipe->output) {
                ret = -EPIPE;