From patchwork Mon Aug 26 02:43:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13777018 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 16EB3C5320E for ; Mon, 26 Aug 2024 02:47:18 +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=T1GAp4QgqoFns9AbOFF32TGzFGMNvnIU4szsG2JXDso=; b=gMVY/fjPh1rZohUtpKad76n3jW hGoXbyfTORDZ6EmIadeQEdiLMwlk1Fk6nqTEVPJToIyYBOB21asJzvXe7Vgan1zqR6gI/lMJrZ4f5 nolk30h6mo+j5K0NoPwzkQrKVwvrK+rMAtcVYbW5iZ8x8x85z5VOQlvzIkT7dd/GQDOIkI6PYsae1 VzMvIuh4J+jtYmwPpY+CjPAJzkBoJY4zgCxTQnqm0mMM2TSUdhf2HRKrL2w6dOzu3Gb5GeExJUF+u p3Lb2Hg9GE3V8WP2c/W/nrMsDr7y2XIeMvhJe/QPabki6SyYNV4qXtpKODFiGFw23U89Gdo7oMm4L 8AuI9LIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siPl6-00000005ZM7-3Xtd; Mon, 26 Aug 2024 02:47:08 +0000 Received: from mail-japaneastazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c405::1] helo=TY3P286CU002.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siPhu-00000005Yla-2Bxo for linux-arm-kernel@lists.infradead.org; Mon, 26 Aug 2024 02:43:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=COzAb0W66vftGgO67F+W/dV4u2wyzvAtPuLOHcq9+zMyU/9A3aITr+KUeBKvacMrDMVM1sDhKwYagx7eOkg30H4nMREytGMz0SFNrTh/jZSAOiCP8cRw4jHXmpYCnC4aa6mrtt5kAlpu+D6JKChC46O0X6gXNIGZmHB4bf5DHxYojXcVOV2kO7TkRyf9pRL5Ro2TduTDe10u555cCidQCEIvJk6jBUdUIV6w2qgcenxmVsWoL0NpPWiFdQ5H3Ej5/8uOag7AuEl44t1mNLlZI82QHf+Pi46/AL94p20i9z5TEkbaiuoD7bfKF230tLRCb/xEUYJKq3FBSrOTalPlIg== 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=T1GAp4QgqoFns9AbOFF32TGzFGMNvnIU4szsG2JXDso=; b=m84kR+43goxBtHXbeG8niq+/cT+MjyrNv7mp/jD2+l6S8eEHGGAbG2hgT9lrr6JqJIdP53dVRAKmS6MRayTCfvg+uFfEBOMhmLD2GMLD0JuhCi1qzJa1IBRGFg7GNduwpg74Nod87qPMMmcbxVR1qv8wVglIEMeZvgFU3PZtYZX6RdxuDWeQDAUelHrhi8IBiXWdgSvPBNQ21pl1BjhXotIZK6T6dRVfKKujwN6ePfyq34t8c73FK201GXGB4ldEHdeJZTU07C/ZdJaMgbldOax6Cgx3XwrD2t7afsRc031+EO9k3DssCpvdxadOxtul6FZdC0qaBftd11AKCIk+2g== 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=T1GAp4QgqoFns9AbOFF32TGzFGMNvnIU4szsG2JXDso=; b=ebAkgDCs9l1EbtClxvCQXXGWz/Nfe3skYWHmrzHcuLyNlQSoOlK82hVuE86DjpyqyUu/kRkWbBzn8i+4AQtVE0AjWTzAMOR15QB7KbsWMYhh4chFJTMc18wbgc/253h0nLxdMy6Fa2+fWVEDijHWDRaXBJIokBIIV4JcU5iOAmM= 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 TYCPR01MB10616.jpnprd01.prod.outlook.com (2603:1096:400:290::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Mon, 26 Aug 2024 02:43:43 +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.7875.016; Mon, 26 Aug 2024 02:43:41 +0000 Message-ID: <877cc4qa02.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v3 4/9] ASoC: rcar_snd: 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: <87cylwqa12.wl-kuninori.morimoto.gx@renesas.com> References: <87cylwqa12.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 26 Aug 2024 02:43:41 +0000 X-ClientProxiedBy: TYCP286CA0341.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:38e::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB10616:EE_ X-MS-Office365-Filtering-Correlation-Id: 84913690-1bf1-4de4-f6b7-08dcc578e593 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|7416014|376014|366016|38350700014|921020; X-Microsoft-Antispam-Message-Info: OCfzSt0SvrJ7OvTKGFBhNTSu+VDnYH3wMhA7Go2rLvpuJk7Q1BSnOfBj/E1FI6uNqpMZmnKTLEWKiZ99ULyhfSm3a9wj72pBGrp3l74MHLEh/zvi4JOD4iCv9AjnLTBsvF8ar+HYGjYRcFYrM9eUk9FSBjyfnITPqKV3wa7YTIe49rNJUCa0VPEzlrsGobDHimNzKgiF04yETL5FcY5CbDUfNm5TKW87SyRIbtIc7dzG4Zbi3Occ4mez9zNT+YK5Y+BtPs0cpKe93A+D4OKpUWvVi91eE5KqfKf6fuSY8VdSsEg740uWa20KtEKrASfjVOgfFelqRB1CpA4TvySWE/wFwMTN0HrHN6PiFFAABzZxz3KjcQoUy9DfXzwX0q9soa7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en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(7416014)(376014)(366016)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eMPacOAWhqdI1HnJcoje8IxTd+2rdSwJjhAp2dHXPqU8ZUziA+4Sc1xxqWIrDb0UQu3QpmHVaPrRCCdY27BnyVg6N/K8koAtH7zRtScXSybUc0VzNN9m5zMkrOH/3kfDlNOSM5MEoiH9humusmojfumQ3S6X6yXBC6BOoQB659ZJdVv1Ok4PPG5UJetuhCG45BTYhPNJeMp1b8+6MxzWBGwlrlJ48p6gHvi5YqF5HmzKB/7kHkO45i1aLHZbyWMkCJd53CIwfHtJwE4wW1u93DDa2blNPUoNTftvnP6kIbZvPrg+/Zc+b7tU6MlJc3RNC99XduZ/1K3h8pa7oAZ+4IUp9061xZCqMsKy1S2u8MCNzZD1wL0tOwpQ9MAIFKPMAUlbUsqteHQ9CZ3ktuJOUB6cox3j3re9LoMqDk9KshAbF+lxZ6bY6HKFt9zvuv70t0pAnEU8WdVSrgv3hmVjX1DaQx5c/RagU6PihB6e8hvYXncASTQA8FO3vjgkAkuRE+DdNK9CXkswmJZ9iEPINwnI062SAYFsQRnRqtUc+lYPm9Iex8uZyvOQp2K1fU3vGKgUYU19BCY5QrD35NA/MeKH231+IAhOeAFAbgrDa5pW0ZPQyqc2xWAALAPVF8VbkF5R0uUMg6Yqz3qOLdZc+iSyYU5DpGrf3SRSUYxJEov3uKP04m0VWFfc66a3xHiMnzNVHQ1f7uhKg5ixbURkMjgsChk88a4gHDVudyb9o8GpZ6yHwVhYyffwQ9hIIxV0JLt4RXaR8Xh/nu5ez912BNMLiyIPijX5vyXOEvvxKV4qHZpporwVumvP0xgtgyQzgMnQGCeQRKuNWE56MlCj3Z04FtNfs1u7lJa3LSPU9mG+S1BBQ7nsWe44e5Yck25dGZQb97AmsCVe51Tj/v8g73muRDqav2Axzrlgn58HvxlSVGCeQI+jBneg5ryMgM9Z1WeTFdI1Ygue3Gkp4bmj8JN6kaFzo/ee7FcyQhLMm2eGG71u5zs/Kw93aYXU02ioOScEJXHcISkoDPGZso82I2EnvdGa1vVOfYXBtQWWdnZB79azjLw2Lw4iK/kU6ZG1WZBegrVJPx5uvQzu25QDqcUE2tPR8j8D9/vPFGtL1e5v95ahkJQ5scXP+wUGxSCvIUI4wiCERG26Kgoo/o0ThgUGECq4jy41DkA+5zW9dI8+M3TdbmAE9KBbyviNt5lfyhf/CG0dW+Blyt5hfOKoBDSdNi5+cB+spj6hxc+aJH2N82c4j16nh76yhrj1OCi5BtAxHy/bLSpLFZxrF7kbjC9bFuebnVD/088nxnrxLSgMhe+qCHu9x2FcV2ynXM1AZohJdV6ZObbArjvcVWNroaPZ3YR91u4PmAmWPk/i0bAnviNZVZX3tcdDclE4yBOyCB6EdE2+xVD+B+XWfCABso9e+GEmWcwFkYbYVfInJD6+nu7xUabnFdxBWhufwm9ayjfx9TahQJ1Oyxywv0qe+v+d9g0k4eI8lbxVg02m1qRxAkBHiMPuhGB3g8uCc2aVJTU/annf+fkC44av0gRTyaTHkDco8djoorYl/SDUHR7ESwF35v/PkYoHx1zDXGHN3Wqkl4Lj9oGV0I8aN6xL5corxqcRTlKN0PqLtMXuuMk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84913690-1bf1-4de4-f6b7-08dcc578e593 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 02:43:41.8934 (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: vPnZTnVGB0iTcXG/1iMAobkCFXvAzoBe+JJI502OmWOWhT8E7aTH/oqrVAHOSJ7tJEuAbgNxoUqjfbhu9RFWO5HhXHyjSr5gRAZ/XqRMDuwiD/C9Xtwprhjtj1NLYWk8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB10616 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240825_194350_572241_30BE2435 X-CRM114-Status: GOOD ( 12.17 ) 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 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 15cb5e7008f9f..dd8e9bfee6c0c 100644 --- a/sound/soc/sh/rcar/core.c +++ b/sound/soc/sh/rcar/core.c @@ -1277,11 +1277,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) { @@ -1489,10 +1486,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)) {