Hi Stephen

> Hmm. I think that the .of_xlate_dai_name should be something related to
> the object (e.g. CODEC) that contains the DAIs, rather than the DAIs
> themselves. The intent is to ask some object (e.g. CODEC) which of its
> DAIs is represented by the DT DAI specifier, not to ask each DAI whether
> it is represented by that particular DT DAI specifier.
> 
> Aside from that, I'd expect the patch above to be something more like:
> 
> const char *fsi_xlate_dai_name(struct snd_soc_dai *dai,
>                               const struct of_phandle_args *args)
> {
>       switch (args[0]) {
>       case 0:
>               return fsi_soc_dai[0].name;
>       case 1:
>               return fsi_soc_dai[1].name;
>       default:
>               return NULL;
>       }
> }

Thank you for pointing it.
I use this style in next patch.

Best regards
---
Kuninori Morimoto
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to