From patchwork Mon Oct 26 23:01:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 7492581 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 09796BEEA4 for ; Mon, 26 Oct 2015 23:04:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4E70420855 for ; Mon, 26 Oct 2015 23:04:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 766332085B for ; Mon, 26 Oct 2015 23:04:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752557AbbJZXER (ORCPT ); Mon, 26 Oct 2015 19:04:17 -0400 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:45021 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751993AbbJZXDv (ORCPT ); Mon, 26 Oct 2015 19:03:51 -0400 Received: from lanttu.localdomain (lanttu.localdomain [192.168.5.64]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 476DB600A6; Tue, 27 Oct 2015 01:03:45 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com, javier@osg.samsung.com, mchehab@osg.samsung.com, hverkuil@xs4all.nl Subject: [PATCH 11/19] v4l: vsp1: Use the new media_entity_graph_walk_start() interface Date: Tue, 27 Oct 2015 01:01:42 +0200 Message-Id: <1445900510-1398-12-git-send-email-sakari.ailus@iki.fi> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445900510-1398-1-git-send-email-sakari.ailus@iki.fi> References: <1445900510-1398-1-git-send-email-sakari.ailus@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sakari Ailus --- 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;