From patchwork Thu Oct 24 02:20:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13848247 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52076D0BB50 for ; Thu, 24 Oct 2024 02:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date: Content-Type:References:In-Reply-To:To:Subject:From:Message-ID:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ix/Ro7yTftdZQYwbQYMchwMoBW7NvuI0ER9wRiSIbMU=; b=h57QxZq+PO12fAc1OMPnXs4utb ejUYMVKJ1t3HUCW8rAhenvD17BbxAMc/TqkfbE76kCqWoVuFYATnrQtCkexynazNvoQYK3oRXhvuE POckzcf38W5+R4Gou11yogwXjtL6qmUI/nr+XnXuah1/z4+tlJlAT7/tDlpC+stsGut4UrpIF2bsG 4Dix5WbqkB4GHlnkgOafh+kiUXb5NSrOh2SX6bGzCTJ6zrTBb1jLrxvJJtuwW8GLhM+EpZe4HP/PD UYRCsR+MMsxmnbJ9U4GWEO/YjQuakcn2RgUzv5jhCtYKWT/6SWe6Vtc1oIs+ygJWqOtzQ958JDqOe Vr6sG+qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3nhK-0000000GXAy-2mwW; Thu, 24 Oct 2024 02:35:38 +0000 Received: from mail-japanwestazlp170110001.outbound.protection.outlook.com ([2a01:111:f403:c407::1] helo=OS0P286CU010.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3nSs-0000000GVHX-2PBh for linux-arm-kernel@lists.infradead.org; Thu, 24 Oct 2024 02:20:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=V9sa5cp0bwfaAfvxolP4gnKMiy+LDdyH7vMzXelJIAmPn88iIQz+JV4BQ21mhTotH5Vtyf4L5vAjKK+eQ06Pmq5vycswIcxKX8Cl70Q6xXMnKyePAuVhaqowyLltsvNViVrA5AMoBseNpJMC7mkGscRyZx1kryFZfC+JIUNAQCPJ5lKtaT4b5RxpRMXGSka3dvTTucEzBPGtsD9QwqIAtWoeKqIxcK/MmqWL+/D6qiiXxF1dBS3ofPkCD/jMzPEX7wHzkAcRlw0m32NSL0FhvQCn/M2LfEWcPZS4BNely/QfTQLbTSPllRWmJ0lBPkXFCUgrDrGINW9sADXNgGBuPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ix/Ro7yTftdZQYwbQYMchwMoBW7NvuI0ER9wRiSIbMU=; b=hBgH8y53YHoTdZkzfaWC6WojnDj4rWI5N0ibJlerMLZpnhzdSgnUmuTX/0I2/LXcVpSRX0QGQJPixWiYKE/vcz7HWNtKVD7LYhZ3wxLVV9WaK9BFS0Fau6zCKlNANBLa/OUakNLQ5h3Hhtth14PXsSBKTvw7JW+uTFtVVEwnNz0C5OTdnl8rm9++0e2xLhHkMADRsS2TkLJwMRL2UHeZnlve38XOOCg5fg0Ee8Hxdx/w4wH+8pMj2cWcbc5YCCpc1pz74GGoZr32fxsKzqNxARetKWNnQ5owyd3DNV3y/AHZsEE/eq6hdvbdppU6DujGLDqWXBAaHk6pYQyQSoXGAg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ix/Ro7yTftdZQYwbQYMchwMoBW7NvuI0ER9wRiSIbMU=; b=P8QmYbBhNgieexoJAInY9jXbd03WywGtCzYftZ9L+3mZKJayaiJFTZ6ukIh5AhoqMGqcLUnQK8tsp7pkGyMQZkRi7/hW/pHceZMC0Fj/KQzj2HheZc2spWp7YgbMX+Lq3vrQk8tNtySKQUMz7YAhpE2Q1MqBCeVvfh82yLpjHK4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by OSZPR01MB8629.jpnprd01.prod.outlook.com (2603:1096:604:187::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Thu, 24 Oct 2024 02:20:40 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.8093.014; Thu, 24 Oct 2024 02:20:40 +0000 Message-ID: <87a5eub5s8.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v8 9/9] media: xilinx-tpg: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Daniel Vetter , David Airlie , Helge Deller , Jaroslav Kysela , Laurent Pinchart , Liam Girdwood , Maarten Lankhorst , Mark Brown , Mauro Carvalho Chehab , Maxime Ripard , Michal Simek , Rob Herring , Saravana Kannan , Takashi Iwai , Thomas Zimmermann , Tomi Valkeinen , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, linux-omap@vger.kernel.org, linux-sound@vger.kernel.org, Sakari Ailus In-Reply-To: <87msiub5tt.wl-kuninori.morimoto.gx@renesas.com> References: <87msiub5tt.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 24 Oct 2024 02:20:39 +0000 X-ClientProxiedBy: TYCP286CA0116.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OSZPR01MB8629:EE_ X-MS-Office365-Filtering-Correlation-Id: a9231d26-303c-47ef-ef37-08dcf3d27440 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: Wvrs2Sn9nhkM6joYAPxQUi2yVUmrXnkksOcXfhhm5TdJegNB+xqR9eozQY9cLPpGGMQcvSnGasRqqdFOUtbqnhwHK1K1esmQ6UxTFdMeoRRNYdS6MhF3NvtO7iFV8ZuJGo5qQ8oAxJz98VjQQAQG9wVR5EwaoUWEmgMtYBPyT2+WHm65aEIFlmP8ZVAeIA17JgQnlvUkc9ZeRbetA1H362DcXXR94Gu4Ts0j8XT5gwgXdOkbTDva9x+S3+HBEj00x5gfvlUV3bb8VelNiDdi0HlGz1uUQ6aQqMRPGhmNGzuXeVaNjwJcdxoU94agig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M7DMnnl X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: A6odIuqUGTjhbUP5/bHkIO6w1l9AWhUzll7rdwpZuyNYF7jSKTzS0qyOk9E2uH6AzdxexAesBcMkbEl3m+FpTgrdZvnkq4IDTqtbTUH1wKPun9h1HwQOjyweFYzerae8O30T2ZvZrI4a0LdhVVSxMvEshs8L0efDQK0zOY7Pm8amxTnVuks2Xko4eocpwte3JZexaCme36BNh35Qlgq5y3B0s3Bfscsrp9+6pWC8PtNWj5TTMq5rrxj6IfIxS+TifFlhDWgU61RidWjFr1RMLlXJrIqR7Ys6log4cAmvbYyreIIeupUJ3YBUyXVesPBq2YBL4FigPbWErMtzajs1jwJwg6fzoMbSsxaaTnUJmjtrdyiM/ixtWn6dRU4YRZzzLOfHjigAsXvMTmH9YAkH4cgXn4cQkQp+4R+HfS3J0/i/gPa2MOcZzYG0qbveakrNNt7/ElxXezIxUKD0uhzLhAzU8MKiwtnLWUyIwkIQQ93TDWWmqcoTXMietkX9nRcFaIyYg8O26mfvSA0NePzk6jQWy9BbOKXz+KDowQJZF/1v6A0ZV2aYepGiQn5M/JvwXEkuLGGaF5NQNymLbc5uwbaVEY+ugQTE3IPCArIxiCu2oyA5qdWZHQb5/e5Uyn5WtoJy2O01JVICyRjQVS7GVzn4NK67CdHm73IK7QmoQhrMZPBXJlu+4TcuXlhPSxH4pLnZpk1EmBnXTrjD7mzsZC4Ks3GjP0qr5wfbggegRLSe5opinrHuuGLjz9TRcmqylGo5e59jZ7CliHXDE6gBYzaTOnYNFcy12n6/hLczVFb3O8IfOyqW2CPPVW9WiIU8pw5DOqGijtM6tzgCoBCrlgUanAv1bdhyvCnxU1ZRCmjSUpirI2QxJMTXHFkoJ6hl+u5YTZZeFpntG/fZseEzaxK8m1atzbtT3yaFEO4zcu+JTXZquJuGPuYTIx1Pd5giMO0xTKJUBJ0Y7h3e1TbHeiuwNCICSzvcI9Nog+QueVt4SBg8U4/Y3r4bfpvSsP8RuPnNkA2GH4qiGZKobUnpB4rp/n8jaTd2GBuCNnYQIGhlPtkGbngEWr430yZqVtkJufmuT3W/l0o/1ThKy9dHkhuOdFGuqibB27ZzKAe2wLil9oomvXEyO6sFbQH7/Kr0LRbnQopFLWr0HrAAqcX36lBnibSeL1aPIiGnruhdN8canP8BidUFjpybxfG/rC5XSnkEl7+SXTdTAyUHyQ2bCSCcNwj9dp4aOMW4uuJLliVdTyf/6DKRnRbjRVIQdV7C5mk4eVMTYz6G7jUBFw2vrGLCIhbHe1rR7EPub8HvSk4puNWrpUA9bf0u1bIfjVhriLZ+fJCoqCnU43oOPWNBKmsOZFk6/RW0dDCpeBbW+ukABi2NknBQU8O37q8zPU2171RfOsSzlcZIWW8I1/FXIiRro8xpLnA66CwQ8+snEetczQAL0df5YhSc/BG7h02QYjDU3cVTaE1ZEEZeQ3vpvWuGO4yMorcHwIMubdwMaDE/3PJXiqyJZktmrwBvOg1Yjgt+3ERBlHqqEJhmcnO176DFbJWSslaoahO3nGYc55eZe2c9tSH7RF/NrOyia4pjLpkN9XKGGdTdB2iR2xRY86UdyI20gjhH7XOygLnj6PI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a9231d26-303c-47ef-ef37-08dcf3d27440 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2024 02:20:40.0005 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: maPpq1MdI7EQoNERAFm+iSK64pIZuFiqTS0j3Xe3xo7VDkZUZIoAi7++gtaYwMY2Yyv2qGDMdCWDJsieu5uWN3lX/X82EmtHAuMls9uvxS02ek6mvFnnQrC0L7gNv+i/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB8629 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_192042_656204_86DACC2A X-CRM114-Status: GOOD ( 14.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Tomi Valkeinen Acked-by: Sakari Ailus --- drivers/media/platform/xilinx/xilinx-tpg.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c index e05e528ffc6f7..1d67f576a44ff 100644 --- a/drivers/media/platform/xilinx/xilinx-tpg.c +++ b/drivers/media/platform/xilinx/xilinx-tpg.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -711,22 +712,13 @@ static int xtpg_parse_of(struct xtpg_device *xtpg) { struct device *dev = xtpg->xvip.dev; struct device_node *node = xtpg->xvip.dev->of_node; - struct device_node *ports; - struct device_node *port; unsigned int nports = 0; bool has_endpoint = false; - ports = of_get_child_by_name(node, "ports"); - if (ports == NULL) - ports = node; - - for_each_child_of_node(ports, port) { + for_each_of_graph_port(node, port) { const struct xvip_video_format *format; struct device_node *endpoint; - if (!of_node_name_eq(port, "port")) - continue; - format = xvip_of_get_format(port); if (IS_ERR(format)) { dev_err(dev, "invalid format in DT"); @@ -744,7 +736,7 @@ static int xtpg_parse_of(struct xtpg_device *xtpg) } if (nports == 0) { - endpoint = of_get_next_child(port, NULL); + endpoint = of_graph_get_next_port_endpoint(port, NULL); if (endpoint) has_endpoint = true; of_node_put(endpoint);