Re: [PATCH v2 9/9] ASoC: simple-card: Handle additional devices

From: Kuninori Morimoto
Date: Sun May 28 2023 - 20:19:22 EST



Hi Herve

Thank you for the reply

> > static int __simple_for_each_link (...)
> > {
> > ...
> > => add_devs = of_get_child_by_name(top, PREFIX "additional-devs");
> > ...
> > }
> >
> > static int simple_populate_aux(...)
> > {
> > ...
> > => node = of_get_child_by_name(dev->of_node, PREFIX "additional-devs");
> > ...
> > }
> >
>
> Well, of_get_child_by_name() is called twice to retrieve the additional-devs
> node but for very different reason.
>
> In __simple_for_each_link() to filter out the node as it has nothing to do with a DAI.
> In simple_populate_aux() to take care of the devices declared in the node.

I thought it is better to handling "device" and "filtering" in the same place,
if it has "additional-devs" on the DT. Because we don't need to filtering
if don't need to care about device.

But this is very small detail, not a big deal to discuss about for
a long time.

Thank you for your help !!

Best regards
---
Kuninori Morimoto