On Tue, Mar 9, 2021 at 5:38 PM Mark Brown <broonie@xxxxxxxxxx> wrote: > > On Tue, Mar 09, 2021 at 10:23:28AM +0200, Daniel Baluta wrote: > > From: Daniel Baluta <daniel.baluta@xxxxxxx> > > > > Platform may be specified by either name or OF node but not > > both. > > > > For OF node platforms (e.g i.MX) we end up with both platform name > > and of_node set and sound card registration will fail with the error: > > > > asoc-simple-card sof-sound-wm8960: ASoC: Neither/both > > platform name/of_node are set for sai1-wm8960-hifi > > This doesn't actually say what the change does. Will send v2 with a better explanation. > > > - dai_link->platforms->name = component->name; > > + > > + if (!dai_link->platforms->of_node) > > + dai_link->platforms->name = component->name; > > Why would we prefer the node name over something explicitly configured? Not sure I follow your question. I think the difference stands in the way we treat OF vs non-OF platforms. With OF-platforms, dai_link->platforms->of_node is always set! So we no longer need to set dai->platforms->name. Actually setting both of_node and name will make sound card registration fail! In this is the case I'm trying to fix here.