[media] davinci: Use a local media device pointer instead

The function has a local variable that points to the media device; use
that instead of finding the media device under the entity.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sakari Ailus 2016-11-28 09:48:33 -02:00 committed by Mauro Carvalho Chehab
parent 2312d8b8a0
commit 0cffd6312f
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ static int vpfe_prepare_pipeline(struct vpfe_video_device *video)
pipe->outputs[pipe->output_num++] = video;
mutex_lock(&mdev->graph_mutex);
ret = media_graph_walk_init(&graph, entity->graph_obj.mdev);
ret = media_graph_walk_init(&graph, mdev);
if (ret) {
mutex_unlock(&mdev->graph_mutex);
return -ENOMEM;
@ -300,7 +300,7 @@ static int vpfe_pipeline_enable(struct vpfe_pipeline *pipe)
mdev = entity->graph_obj.mdev;
mutex_lock(&mdev->graph_mutex);
ret = media_graph_walk_init(&pipe->graph, entity->graph_obj.mdev);
ret = media_graph_walk_init(&pipe->graph, mdev);
if (ret)
goto out;
media_graph_walk_start(&pipe->graph, entity);