diff options
author | Sakari Ailus <sakari.ailus@iki.fi> | 2015-12-16 08:32:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 09:19:18 -0500 |
commit | 106b9907c368e32d0b01d8ea682c44ef811e6e36 (patch) | |
tree | 00af7a1a7f287d500805c27a88d0d85d687370c0 /drivers/media/media-entity.c | |
parent | e03d220336dd69292370393f5eee98ac17eda308 (diff) |
[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 <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r-- | drivers/media/media-entity.c | 12 |
1 files changed, 11 insertions, 1 deletions
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, | |||
383 | 383 | ||
384 | mutex_lock(&mdev->graph_mutex); | 384 | mutex_lock(&mdev->graph_mutex); |
385 | 385 | ||
386 | media_entity_graph_walk_start(graph, entity); | 386 | ret = media_entity_graph_walk_init(&pipe->graph, mdev); |
387 | if (ret) { | ||
388 | mutex_unlock(&mdev->graph_mutex); | ||
389 | return ret; | ||
390 | } | ||
391 | |||
392 | media_entity_graph_walk_start(&pipe->graph, entity); | ||
387 | 393 | ||
388 | while ((entity = media_entity_graph_walk_next(graph))) { | 394 | while ((entity = media_entity_graph_walk_next(graph))) { |
389 | DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS); | 395 | DECLARE_BITMAP(active, MEDIA_ENTITY_MAX_PADS); |
@@ -481,6 +487,8 @@ error: | |||
481 | break; | 487 | break; |
482 | } | 488 | } |
483 | 489 | ||
490 | media_entity_graph_walk_cleanup(graph); | ||
491 | |||
484 | mutex_unlock(&mdev->graph_mutex); | 492 | mutex_unlock(&mdev->graph_mutex); |
485 | 493 | ||
486 | return ret; | 494 | return ret; |
@@ -502,6 +510,8 @@ void media_entity_pipeline_stop(struct media_entity *entity) | |||
502 | entity->pipe = NULL; | 510 | entity->pipe = NULL; |
503 | } | 511 | } |
504 | 512 | ||
513 | media_entity_graph_walk_cleanup(graph); | ||
514 | |||
505 | mutex_unlock(&mdev->graph_mutex); | 515 | mutex_unlock(&mdev->graph_mutex); |
506 | } | 516 | } |
507 | EXPORT_SYMBOL_GPL(media_entity_pipeline_stop); | 517 | EXPORT_SYMBOL_GPL(media_entity_pipeline_stop); |