[v2,12/22] v4l: vsp1: Use the new media_entity_graph_walk_start() interface
diff mbox

Message ID 1448824823-10372-13-git-send-email-sakari.ailus@iki.fi
State New
Headers show

Commit Message

Sakari Ailus Nov. 29, 2015, 7:20 p.m. UTC
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 drivers/media/platform/vsp1/vsp1_video.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Mauro Carvalho Chehab Dec. 12, 2015, 3:24 p.m. UTC | #1
Em Sun, 29 Nov 2015 21:20:13 +0200
Sakari Ailus <sakari.ailus@iki.fi> escreveu:

Same as the other similar patches: description is missing.

I would prefer if you could merge those patches that do the same
thing on different drivers. Less emails to write ;)

Won't be replying anymore to patches that are ok but misses
descriptions.

> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  drivers/media/platform/vsp1/vsp1_video.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
> index f741582..ce10d86 100644
> --- a/drivers/media/platform/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/vsp1/vsp1_video.c
> @@ -415,6 +415,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))) {
> @@ -448,6 +454,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;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
index f741582..ce10d86 100644
--- a/drivers/media/platform/vsp1/vsp1_video.c
+++ b/drivers/media/platform/vsp1/vsp1_video.c
@@ -415,6 +415,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))) {
@@ -448,6 +454,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;