Skip to content

Commit b345b5b

Browse files
morimotorobherring
authored andcommitted
ASoC: test-component: use new of_graph functions
Current test-component.c is using for_each_endpoint_of_node() for parsing "port", because there was no "port" base loop before. It has been assuming 1 port has 1 endpoint here. But now we can use "port" base loop (= for_each_of_graph_port()). Let's replace for_each function from "endpoint" base to "port" base. Signed-off-by: Kuninori Morimoto <[email protected]> Acked-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 3d4b014 commit b345b5b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/generic/test-component.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,6 @@ static int test_driver_probe(struct platform_device *pdev)
521521
{
522522
struct device *dev = &pdev->dev;
523523
struct device_node *node = dev->of_node;
524-
struct device_node *ep;
525524
const struct test_adata *adata = of_device_get_match_data(&pdev->dev);
526525
struct snd_soc_component_driver *cdriv;
527526
struct snd_soc_dai_driver *ddriv;
@@ -591,7 +590,7 @@ static int test_driver_probe(struct platform_device *pdev)
591590
}
592591

593592
i = 0;
594-
for_each_endpoint_of_node(node, ep) {
593+
for_each_of_graph_port(node, port) {
595594
snprintf(dname[i].name, TEST_NAME_LEN, "%s.%d", node->name, i);
596595
ddriv[i].name = dname[i].name;
597596

0 commit comments

Comments
 (0)