Message ID | 87jzfs6j8v.wl-kuninori.morimoto.gx@renesas.com |
---|---|
State | New |
Headers | show
Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010024.outbound.protection.outlook.com [52.101.229.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 640BC84E11; Wed, 4 Sep 2024 06:11:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.24 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725430294; cv=fail; b=I40xtPTat4mkjBjZJ4E51gBF+mV50CqujkKXg+F3ipPZhiAhJg8iRMD1Vd9VHeNLDIlYXloJlviUOQ5Ht+3nxYwHYqF7Sl6INnMl25hS+wfrxtyCK13MC+oAYO9wrm58gkHQsbvF0byDFmlqdOrfXvDdfkO/rAtqtLSOcq7ul9A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725430294; c=relaxed/simple; bh=TCjP/TZDOiB2DgqkE1r5uNOd70c2q7ozNtqwzoGAphs=; h=Message-ID:To:In-Reply-To:References:From:Subject:Content-Type: Date:MIME-Version; b=DWOzwfCVJjXjtNaFyzLcl6ujH0Cm9xYTNoQELNCh+/V6ARKL0eEQdT/GRW/ivLhTzJPz3x9NJTJd7H86c2u0S9MwmIMZ6OCpBjx2Jx5WFgL09mB2IG/9VcXcC5YAAwbAadnuG85hJH46Mj1O9od7TLlDC28jReEsJh/m64Tttjc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=UfL1yunI; arc=fail smtp.client-ip=52.101.229.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="UfL1yunI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oqmj5F2F02DH4KB3rYFUgGv4LQiKnB5VNbSSrHLKK6ep8NzEFGhlKX6zcQ36YCDCtBI3ECfNR9vComL4AVrMpILkDQpU9jL03SPRHKNynjjNpv+qVb5v45C5b+qc5ZkDVFKEBWyHeOg0RkxfksPiR7GdmUBeFIXd7kndrimTpGTO46dWnuG26dt6R+uWL0KgwmT+ndFiwd5VHYDef3QOj+ywNx1eIWsNTEtnTJESkqBS2p0lDJMi62NyWWBnoLyD4py1hGyL8/vOGkss3mch3HHeJ5fB3DUneg87G3iQOcGa4h0nFzQ25dZK5Ehaw2RRxdyKhuIOa/tCZ/K667sljQ== 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=kkJ0ltVTSz196uhSee9Ig9BdLX9O4PwwW/k2og7b4lU=; b=qLbho+J/8b5DUWla+TzbNzesOYdFQ7Ksnw71DBDDqUGDkHY3HZJrRpa009CAbmzfMzWrCMajG606Bw36AfqkuBQWASE917/R9gwUirYb8pO9nsKtd2RLYlcAmSdXkhzMub/zqPvUzIjlSZ0ZDT6ilOcqN8Y6VoDl2AlEoF6GTkbJjzsfuE8+WdFleWY6One/IDmd6xYgfl+wE7x7/5NOFhOo2aRzg0tdnZ5Ncih06S32hcW1iG5qb46TjQ5b2cLJMbMIKtjRpXVvyXar4959GJ3bVr6l5nqlNfdhRqOBjHC+WI63NBoV5OBddhC8QpNMmoakw6AcPxP3A2pheVPmgA== 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=kkJ0ltVTSz196uhSee9Ig9BdLX9O4PwwW/k2og7b4lU=; b=UfL1yunIWjvGDBYuz8YJSRcyGd8dBYGUuNoG35qC4xVo12v2OCWPRX4BHdZoX1Dlb1w1IFCpZ9SRxXqAoEoYw3MwtnYcPFBRtlY5B1TcccIHPfJw/WrHPCMe+UJmpcCCxoBc1MmQ5GU/hHhqrtMW48mGgpX2z6YjCM0BNzNDfik= 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 OS3PR01MB7309.jpnprd01.prod.outlook.com (2603:1096:604:11e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Wed, 4 Sep 2024 06:11:29 +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.7918.024; Wed, 4 Sep 2024 06:11:29 +0000 Message-ID: <87jzfs6j8v.wl-kuninori.morimoto.gx@renesas.com> To: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>, Helge Deller <deller@gmx.de>, Jaroslav Kysela <perex@perex.cz>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Liam Girdwood <lgirdwood@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Mark Brown <broonie@kernel.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, Maxime Ripard <mripard@kernel.org>, Michal Simek <michal.simek@amd.com>, Rob Herring <robh@kernel.org>, Saravana Kannan <saravanak@google.com>, Takashi Iwai <tiwai@suse.com>, Thomas Zimmermann <tzimmermann@suse.de>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>, 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 <sakari.ailus@iki.fi> In-Reply-To: <87r0a06ja1.wl-kuninori.morimoto.gx@renesas.com> References: <87r0a06ja1.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v5 5/9] ASoC: audio-graph-card: use new of_graph functions User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Content-Type: text/plain; charset=US-ASCII Date: Wed, 4 Sep 2024 06:11:28 +0000 X-ClientProxiedBy: TYCP286CA0277.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: <linux-fbdev.vger.kernel.org> List-Subscribe: <mailto:linux-fbdev+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-fbdev+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7309:EE_ X-MS-Office365-Filtering-Correlation-Id: 625349f4-7eb5-40e2-c536-08dccca86a5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|52116014|7416014|921020|38350700014; X-Microsoft-Antispam-Message-Info: i1+rq76tDMQT2IbP7XKNuxWAufYjWNQ56RLcz7b+YA9/Two2H05wBEXb0KIS6PXWS0iSJwdcYvA8GG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tfMh4JINvgRfyjspoDE9uXPgYvMMf1LFabFSwVH8umc60KwOUmHlmaGmsxAm9UD+G0Jiyj11dAcxvsqCVGKDj+IufCryvStduU6MpNZr9Qh6NHkehBLC7w+j3HFERooId3zL0KcfEbsMa8btQ/GRfTz6kJHkvnySH4bEFj7s7jAFgFpowQ70EocmjNnyO6cA3zcL4qV0wvPeVA9Zhv5+4um0OHn3oIeSxfJue+uiO16ZLtOXe7Po0LD7kCPuZLYVLtmY2AI8QVsezQ6GyDokXcE8qEd9pyems7SpnY4c= 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)(366016)(1800799024)(376014)(52116014)(7416014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RumwmWphBVA3nd04yJabYWeQTq5ehcVlEfZBB2+iuPYAiX9iuLdNA5TlfMM11t1X1B5iPVv03j5fGLtlhd2DonU05BhztOcQaT/joR40AYFlZNDyhiORkM33uYlVV5ZN2x/+vqY4tmaK7Fz7wN64bXY/U3mnxO2VMM6UaOBZxkiEhSplzgrUm0FLIQJdQVzpePUh1yQ6ouJZlsM9hLGlR6rz3z3wEuk43Ckl32ciRymEOy15GeICjeKarNjz0jTSJ0CICxyO0HgLvcA5xWPi2V90S0RHTgSEhrhqzWs1u0ualMkpJFgljMKViljqGer+nWFWz9cE8JXE5G4KqY+OH3V3DrCkGRQ81ociqg39kj9GmOFMgQQpIW9piXaNgW/V3EXsdVtz7oc4UhKDLnD3YgZS0xwHech/bL1/zQo4lm4fhjvW6mLhA+BTp4uOO/Lbh1viHYEffLF4xQy3+q7V1t+CA57Iv1zii8eNZoOQT1aFvcrdYNohyPsc+G0KqIxkVXuZfU+A3Y4kZhJhn+orY+H+h80Ngy+TNHHnKPIGlYr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A= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 625349f4-7eb5-40e2-c536-08dccca86a5f X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2024 06:11:29.2297 (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: LlqHHXx3lXzIUJ9N6reTFt9tjeTV2aae23StDOX4cQ6WU77N3McY59yTRA2eisp+gP4t6QmhizsgbZT2qUxyc2Mi0sspkL7/wY5imkGPn3ljr4EAFoYv8jxYB5iob3MK X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7309 |
Series |
of: property: add of_graph_get_next_port/port_endpoint()
|
expand
|
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 1bdcfc4d4222e..e7fd3d70ce091 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -361,7 +361,6 @@ static int __graph_for_each_link(struct simple_util_priv *priv, struct device *dev = simple_priv_to_dev(priv); struct device_node *node = dev->of_node; struct device_node *cpu_port; - struct device_node *cpu_ep; struct device_node *codec_ep; struct device_node *codec_port; struct device_node *codec_port_old = NULL; @@ -371,13 +370,9 @@ static int __graph_for_each_link(struct simple_util_priv *priv, /* loop for all listed CPU port */ of_for_each_phandle(&it, rc, node, "dais", NULL, 0) { cpu_port = it.node; - cpu_ep = NULL; /* loop for all CPU endpoint */ - while (1) { - cpu_ep = of_get_next_child(cpu_port, cpu_ep); - if (!cpu_ep) - break; + for_each_of_graph_port_endpoint(cpu_port, cpu_ep) { /* get codec */ codec_ep = of_graph_get_remote_endpoint(cpu_ep); @@ -408,10 +403,8 @@ static int __graph_for_each_link(struct simple_util_priv *priv, of_node_put(codec_ep); of_node_put(codec_port); - if (ret < 0) { - of_node_put(cpu_ep); + if (ret < 0) return ret; - } codec_port_old = codec_port; }