Skip to content

Commit 6cf881b

Browse files
morimotobroonie
authored andcommitted
ASoC: qcom: use snd_soc_{of_}get_dlc()
Current ASoC has snd_soc_{of_}get_dai_name() to get DAI name for dlc (snd_soc_dai_link_component). But we now can use snd_soc_{of_}get_dlc() for it. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87mt0udgn3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent aa560f5 commit 6cf881b

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

sound/soc/qcom/common.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,15 @@ int qcom_snd_parse_of(struct snd_soc_card *card)
9696
goto err;
9797
}
9898

99-
ret = of_parse_phandle_with_args(cpu, "sound-dai",
100-
"#sound-dai-cells", 0, &args);
101-
if (ret) {
102-
dev_err(card->dev, "%s: error getting cpu phandle\n", link->name);
103-
goto err;
104-
}
105-
link->cpus->of_node = args.np;
106-
link->id = args.args[0];
107-
108-
ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0);
99+
ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0);
109100
if (ret) {
110101
dev_err_probe(card->dev, ret,
111102
"%s: error getting cpu dai name\n", link->name);
112103
goto err;
113104
}
114105

106+
link->id = args.args[0];
107+
115108
if (platform) {
116109
link->platforms->of_node = of_parse_phandle(platform,
117110
"sound-dai",

0 commit comments

Comments
 (0)