diff mbox series

[3/9] ASoC: test-component: use new of_graph functions

Message ID 87ikwew8li.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New
Headers show
Series of: property: add of_graph_get_next_port/port_endpoint() | expand

Commit Message

Kuninori Morimoto Aug. 6, 2024, 4:58 a.m. UTC
Current test-component.c is using for_each_endpoint_of_node()
for parsing, but it should use "port" base loop instead of "endpoint",
because properties are "port" base, instead of "endpoint".

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/test-component.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tomi Valkeinen Aug. 8, 2024, 6:38 a.m. UTC | #1
On 06/08/2024 07:58, Kuninori Morimoto wrote:
> Current test-component.c is using for_each_endpoint_of_node()
> for parsing, but it should use "port" base loop instead of "endpoint",
> because properties are "port" base, instead of "endpoint".

The subject of the patch makes this sound like it's just using new 
helper functions, but the description makes me think this is a bug fix.

I think it would be good to mention what are the symptoms of the bug.

> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>   sound/soc/generic/test-component.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c
> index e9e5e235a8a6..6f75da9f86e6 100644
> --- a/sound/soc/generic/test-component.c
> +++ b/sound/soc/generic/test-component.c
> @@ -600,7 +600,7 @@ static int test_driver_probe(struct platform_device *pdev)
>   	}
>   
>   	i = 0;
> -	for_each_endpoint_of_node(node, ep) {
> +	for_each_of_graph_port(node, ep) {

"ep" is endpoint, so the variable name should also be changed (even if 
it's not used).

>   		snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i);
>   		ddriv[i].name = dname[i].name;
>   

  Tomi
diff mbox series

Patch

diff --git a/sound/soc/generic/test-component.c b/sound/soc/generic/test-component.c
index e9e5e235a8a6..6f75da9f86e6 100644
--- a/sound/soc/generic/test-component.c
+++ b/sound/soc/generic/test-component.c
@@ -600,7 +600,7 @@  static int test_driver_probe(struct platform_device *pdev)
 	}
 
 	i = 0;
-	for_each_endpoint_of_node(node, ep) {
+	for_each_of_graph_port(node, ep) {
 		snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i);
 		ddriv[i].name = dname[i].name;