From 106b9907c368e32d0b01d8ea682c44ef811e6e36 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Wed, 16 Dec 2015 15:32:23 +0200 Subject: [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: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/media-entity.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/media') diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 9bf96c71374e..85af715d2a20 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -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 @@ error: 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); -- cgit v1.2.3-59-g8ed1b