From patchwork Tue Aug 6 04:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13754416 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 A974FC3DA64 for ; Tue, 6 Aug 2024 04:58:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 21B1210E2F0; Tue, 6 Aug 2024 04:58:42 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.b="LGV9dpt8"; dkim-atps=neutral Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011003.outbound.protection.outlook.com [52.101.125.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E34510E2EF for ; Tue, 6 Aug 2024 04:58:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dSlY8SA0DU+enZq9GiRzGz9GfTfs08Y/zFrAxZ7OYeJ72SQB6DORhsOGHps2uVYc7Xd8iF8zFUn4VqXLt0sKzhQpxX3SALcfMrzHK+9xKCZ2Y2t6t/QWmsHwbXKieImq5iH1LNhALoOoEJRtPPnb6EvztAb+EgNhXwhkMfZyX22DviewbzoNov5BzAGR9WYgsoaEmatY/T+3oEjfRCXDzhxIv9sFiY/z2EhILD9g1v2+2RnbIdid+ri1dvuXE5ddVAPDzaRsZftvHICaRyJFYKhIgzpnFBN6VTb/yncxqBn7FeTOR3MOAkS8gywp3uCA7R+FJKODAv3KHPl8dmks2Q== 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=UGGX+Q3luKrdwPd/jnIYOtaxjjFA+XQ3cahzrZILqSU=; b=dvymjYHlW22CUqB6V74U+3dbzsnnx17nfAloNRe7TQi3kpqh7LmqrjGLNhXAlJM/NvkREWKNO2W+t+uXxCxHqLhUJgKEfm90CCLQzWvmjlsFOteFPxFjnj+xg75JGGw0PLp/RFibmppIQyA6Tb7CDCG3jjIsSiq1WXPJvKD61GWanawvIO6P3klo+kFqyJx925HSZJ6NQPoTFF7qFEqhTejOHe/L0wA7auKAZqZwTLFK/jYR1Ol5ZvQNmPpA5W3z+m/sIu+SeT4beblfkOeSEWIhyksB5OhRLhZsGO1dWseK1NO8qXHQlJVuysoVLoZWkaFCWLHSsCvot5gmnutRew== 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=UGGX+Q3luKrdwPd/jnIYOtaxjjFA+XQ3cahzrZILqSU=; b=LGV9dpt8g9IPFcTYBN6d4WvQcxl6S5CzMZWe0rdeC2dmm+H69weIn1DHo3F1KZuZktxr5q4Q6xN2Yw1FX0pqu1uXDl/PYD1i00tdfY4bgHTKUyLISnv1GyjnL8E9Cj5h828FSLe1XkOnAtPKAb608HWhwW+WaOSgHUxI5KZr200= 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 TYWPR01MB10409.jpnprd01.prod.outlook.com (2603:1096:400:24d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.24; Tue, 6 Aug 2024 04:58:38 +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.7828.023; Tue, 6 Aug 2024 04:58:38 +0000 Message-ID: <87h6byw8le.wl-kuninori.morimoto.gx@renesas.com> 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 , , , , , , , , 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 , , , , , , , In-Reply-To: <87mslqw8mj.wl-kuninori.morimoto.gx@renesas.com> References: <87mslqw8mj.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 4/9] ASoC: rcar_snd: use new of_graph functions Date: Tue, 6 Aug 2024 04:58:38 +0000 X-ClientProxiedBy: TYBP286CA0013.JPNP286.PROD.OUTLOOK.COM (2603:1096:404:ce::25) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB10409:EE_ X-MS-Office365-Filtering-Correlation-Id: 7b291b25-6394-4d73-e733-08dcb5d46f49 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|52116014|7416014|366016|376014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: rzApNqoHy/1NVOdpNHhxJKnOHdpnZiSZVSbZjacEcU4kIhBaosBOLnjBTM5l3/Il0MSxspqz2f4nbDxGwUbPwr6wSbBtKappxZRv2hJPhpM4Eoa9+rn7wPi4LLKA154Mqw95cJgToTXBy5AP8MavXM0+KGotuXLc/pObbKdcV0EVWcq5Cj70t2edbmr/HRnSs+5sdtN4k5TMaosYTd7mlc3FcmkNhNy5/XWOxEx2ExvUKiJ99dP6kqGFJ6bwRIuI0gtffoHc7Tk13kzMGmOlKxueZkaaE8BOauLNNqKr18Yp3iQNjQSYKVsBm02jcMOGiQFFZ/vnSsg5V07bHv1SQ/4YWiTz2lwEtKOT5wBnpsTDXTHNjnlKn0Yu9AF3g20llrNQiy0mdKJVUoo5MxtcaU06j5dMhICeU3oadAKFCEEDof4ypQ139zA5R/OijdTULCZY4rDWaAERPN+76c6iPfvkztVvuM2WnahitBmmolNBd7dKgtT5biQPZJdIaqwZzHWbYFNBnAUsw5s/y/rCcpQK4W7N8Ab/XZVDPyR0MspDr53XVndEvwyOZW194E+fptz7HzjYtQEe1MEhm8fnD+erMW9zXbmW1sL4W4DgJNWaK3zDr7oze0GC6BukDeSkJ6/FS2DpYZHOH8DcFm2mXupcviLeTitodvP0yrWUukz9bPMyGzAZi6ND8kkP+nxTcnCrP1gKVdq1tf3Gh6zyPQj/awFveXoEYXl21r1r3qbwsiBiAgwOye8kOxPkxzsPhYhMkorBj8/h0QICbrU4UxkEPc9beASvSYt7th2CTzG677x1mVaeZEPZfYQHPdubSfbqWTTlBeCJnGUD4qXZIXtuACOmkUMpMilFkAckIY07lkSJA362gkZ4VCyoY2wQP/8odKByBJLKx9qQ06cnTWiQRKjFYSRNrlVlx94LIPW0MuMMIZ3LGsc1Z4I33lpyncrutks395z+1II9ICQ/BL7CChG5ApDIbzq9Xoyd4SETn3DBh3Mb3yaaRm3UwsNkvaBZCqUIGkUw6yfPxRlJBB/4kIRkDIUkdxNt9YW7APkGNB7ldWR2ZLgjlrWnQg/ribh/8ZxVtqK6eg+sdUktDd8ifYpsjPcQgJffVUEcJYowrfq35ihxDQfsI5rhcfDYW9uJM9f22ro74+/MlNwAu99u/H4ZiBeZPOpvOzKrNh9qod8dBObfP/b2/Su3TCgWrsGQ0XKPJEWtDUv+V5ln62D6H4F+grI8Ra2sznTZpZHkr5z1A81hw9zDPKQHS+OjTbR5NZvPkLxfvy8rQtkoUZG8okpA8Fx5kGKW7c/A2/gO077AfYGCwYRnrxqmde6UPv8c9xfgujj33zRf3V8a7L7TD2k/DERpXgBZgX5h5w8bBZry0/5fv8K+qaUMNAEzM7d0Pb29/hwi0jMkqdbsnQ== 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)(52116014)(7416014)(366016)(376014)(1800799024)(38350700014)(921020); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3DRH8cZrglQxsiP6im3SxXaNI2/oVa5rb3EOVNBHUwiU5e5fKgKks69GEluLsHZPwBA3KYq/r6tvmsDKUxhq76ivqbPDzGXJkcQlPofUoGefJtHSyr95F+oLOTho3RlU3xb2qKnR2W2rPUctYM+7p/NIFGfXxRdO4/dR308FJ1qKeAjlPttddQahyi1ATfh1/wtHcc/iXBOkOAwK2+F+YVRNDUsrZFIxNOFWUWBXnlRxMwRjJaXWzDbe+s7Bjgm8N612COnbklq+UWoLG1roWn7JunKBOBjWVK63VRYHCr9ER0Ke8EldQrLiRwaeSya28yN+5uw0VOwhu2Ai7zfHh6Ej38XC+/mYhJIlgzhD8/ElseTBcEBV/92UdiKb5B5oSqyUEMLXSFidgZaY/j6GoUHdP03XN0kK9y1Nlfe0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pcqCnorC5DUbaDabJXd4kO6lX0MKqRNgYDIbHp6/IlT7g0O32IBVpQaZC8NaLKY8Bx0uYakEHfHM2l8y1iO6sdAyMnBdRZCCXRBSfldjEe7Cn9v8alEA/edaeKulJILePXiWVdaiKQrxBskrM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b291b25-6394-4d73-e733-08dcb5d46f49 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Aug 2024 04:58:38.5465 (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: e3pzmX4J5AgQ+XOjsfEzThoXLY/QfI9qMH185izZWMm7sWYGmE23yQXMWtIfvGSmaLZh5C6VHpQmJCmE7Bjkt4xi4su80a9TpEaPSjXbCCHBXmtqyBgv67KWegkhbLls X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB10409 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Now we can use new port related functions for port parsing. Use it. Signed-off-by: Kuninori Morimoto Acked-by: Mark Brown --- sound/soc/sh/rcar/core.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c index 63b3c8bf0fde..eb146cf836eb 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1294,11 +1294,8 @@ static int rsnd_dai_of_node(struct rsnd_priv *priv, int *is_graph) /* * Audio-Graph-Card */ - for_each_child_of_node(np, ports) { - if (!of_node_name_eq(ports, "ports") && - !of_node_name_eq(ports, "port")) - continue; - priv->component_dais[i] = of_graph_get_endpoint_count(ports); + for_each_of_graph_ports(np, ports) { + priv->component_dais[i] = of_graph_get_port_count(ports); nr += priv->component_dais[i]; i++; if (i >= RSND_MAX_COMPONENT) { @@ -1506,10 +1503,7 @@ static int rsnd_dai_probe(struct rsnd_priv *priv) struct device_node *ports; struct device_node *dai_np; - for_each_child_of_node(np, ports) { - if (!of_node_name_eq(ports, "ports") && - !of_node_name_eq(ports, "port")) - continue; + for_each_of_graph_ports(np, ports) { for_each_endpoint_of_node(ports, dai_np) { __rsnd_dai_probe(priv, dai_np, dai_np, 0, dai_i); if (!rsnd_is_gen1(priv) && !rsnd_is_gen2(priv)) {