struct snd_soc_card *card;
struct snd_soc_dai_link *link, *codec_link;
int num_pcms, ret, i;
- struct of_phandle_args args = {};
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
}
for (i = 0; i < num_pcms; i++, link += 2) {
- ret = of_parse_phandle_with_args(cpu, "sound-dai",
- "#sound-dai-cells", i, &args);
- if (ret < 0)
- break;
-
- if (!args.np) {
- dev_err(dev, "sound-dai property parse error: %d\n", ret);
- ret = -EINVAL;
- break;
- }
-
- ret = snd_soc_get_dai_name(&args, &link->cpus->dai_name);
- of_node_put(args.np);
-
+ ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, i);
if (ret < 0)
break;
}