Commit 106b9907 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

[media] media: 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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent e03d2203
......@@ -383,7 +383,13 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
mutex_lock(&mdev->graph_mutex);
media_entity_graph_walk_start(graph, entity);
ret = media_entity_graph_walk_init(&pipe->graph, mdev);
if (ret) {
mutex_unlock(&mdev->graph_mutex);
return ret;
}
media_entity_graph_walk_start(&pipe->graph, entity);
while ((entity = media_entity_graph_walk_next(graph))) {
DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS);
......@@ -481,6 +487,8 @@ __must_check int media_entity_pipeline_start(struct media_entity *entity,
break;
}
media_entity_graph_walk_cleanup(graph);
mutex_unlock(&mdev->graph_mutex);
return ret;
......@@ -502,6 +510,8 @@ void media_entity_pipeline_stop(struct media_entity *entity)
entity->pipe = NULL;
}
media_entity_graph_walk_cleanup(graph);
mutex_unlock(&mdev->graph_mutex);
}
EXPORT_SYMBOL_GPL(media_entity_pipeline_stop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment