Using cpu_dai.name for DT case will result driver cannot be initialized. For example, device have name "ssi@10010000" in the DT and this value is returning for us by snd_soc_of_get_dai_name() but actual registered name of device is "10010000.ssi".
Signed-off-by: Alexander Shiyan shc_work@mail.ru --- sound/soc/generic/simple-card.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 1d87db8..3a054c4 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -219,7 +219,8 @@ static int asoc_simple_card_probe(struct platform_device *pdev) */ cinfo->snd_link.name = cinfo->name; cinfo->snd_link.stream_name = cinfo->name; - cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name; + if (!of_cpu) + cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name; cinfo->snd_link.platform_name = cinfo->platform; cinfo->snd_link.codec_name = cinfo->codec; cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;