From patchwork Wed Mar 10 15:37:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 12128243 X-Patchwork-Delegate: kieran@bingham.xyz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96927C433E0 for ; Wed, 10 Mar 2021 15:39:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 576F764F95 for ; Wed, 10 Mar 2021 15:39:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbhCJPjK (ORCPT ); Wed, 10 Mar 2021 10:39:10 -0500 Received: from vsp-unauthed02.binero.net ([195.74.38.227]:14703 "EHLO vsp-unauthed02.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233214AbhCJPjB (ORCPT ); Wed, 10 Mar 2021 10:39:01 -0500 X-Halon-ID: 9e534042-81b6-11eb-a542-005056917a89 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p54ac5521.dip0.t-ipconnect.de [84.172.85.33]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 9e534042-81b6-11eb-a542-005056917a89; Wed, 10 Mar 2021 16:38:51 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Sakari Ailus , Hans Verkuil , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH] media: v4l2-fwnode: Simplify v4l2_async_notifier_parse_fwnode_endpoints() Date: Wed, 10 Mar 2021 16:37:43 +0100 Message-Id: <20210310153743.3556385-1-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org There are only one user left of __v4l2_async_notifier_parse_fwnode_ep() since [1], v4l2_async_notifier_parse_fwnode_endpoints(). Merge the two and remove some dead code. 1. commit 0ae426ebd0dcef81 ("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()") Signed-off-by: Niklas Söderlund --- drivers/media/v4l2-core/v4l2-fwnode.c | 34 ++++----------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 2283ff3b8e1d8662..2abb1430da1e1cf5 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -839,13 +839,11 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct device *dev, return ret == -ENOTCONN ? 0 : ret; } -static int -__v4l2_async_notifier_parse_fwnode_ep(struct device *dev, - struct v4l2_async_notifier *notifier, - size_t asd_struct_size, - unsigned int port, - bool has_port, - parse_endpoint_func parse_endpoint) +int +v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev, + struct v4l2_async_notifier *notifier, + size_t asd_struct_size, + parse_endpoint_func parse_endpoint) { struct fwnode_handle *fwnode; int ret = 0; @@ -863,17 +861,6 @@ __v4l2_async_notifier_parse_fwnode_ep(struct device *dev, if (!is_available) continue; - if (has_port) { - struct fwnode_endpoint ep; - - ret = fwnode_graph_parse_endpoint(fwnode, &ep); - if (ret) - break; - - if (ep.port != port) - continue; - } - ret = v4l2_async_notifier_fwnode_parse_endpoint(dev, notifier, fwnode, @@ -887,17 +874,6 @@ __v4l2_async_notifier_parse_fwnode_ep(struct device *dev, return ret; } - -int -v4l2_async_notifier_parse_fwnode_endpoints(struct device *dev, - struct v4l2_async_notifier *notifier, - size_t asd_struct_size, - parse_endpoint_func parse_endpoint) -{ - return __v4l2_async_notifier_parse_fwnode_ep(dev, notifier, - asd_struct_size, 0, - false, parse_endpoint); -} EXPORT_SYMBOL_GPL(v4l2_async_notifier_parse_fwnode_endpoints); /*