summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-card.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2023-06-20 05:14:18 +0300
committerMark Brown <broonie@kernel.org>2023-06-20 14:49:23 +0300
commitaa560f5e796ce63074942251197c7161db2392d3 (patch)
treef9ceae05d5dd2a8c97baf98506e63bf2deb476b8 /sound/soc/fsl/imx-card.c
parent3c8b5861850c734add65233e538d4a8c2dff95d9 (diff)
downloadlinux-aa560f5e796ce63074942251197c7161db2392d3.tar.xz
ASoC: fsl: 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/87o7ladgn9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/imx-card.c')
-rw-r--r--sound/soc/fsl/imx-card.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 6f3b1428a5ba..356a0bc3b126 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -551,10 +551,10 @@ static int imx_card_parse_of(struct imx_card_data *data)
goto err;
}
- ret = of_parse_phandle_with_args(cpu, "sound-dai",
- "#sound-dai-cells", 0, &args);
+ ret = snd_soc_of_get_dlc(cpu, &args, link->cpus, 0);
if (ret) {
- dev_err(card->dev, "%s: error getting cpu phandle\n", link->name);
+ dev_err_probe(card->dev, ret,
+ "%s: error getting cpu dai info\n", link->name);
goto err;
}
@@ -582,17 +582,9 @@ static int imx_card_parse_of(struct imx_card_data *data)
}
}
- link->cpus->of_node = args.np;
link->platforms->of_node = link->cpus->of_node;
link->id = args.args[0];
- ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name, 0);
- if (ret) {
- dev_err_probe(card->dev, ret,
- "%s: error getting cpu dai name\n", link->name);
- goto err;
- }
-
codec = of_get_child_by_name(np, "codec");
if (codec) {
ret = snd_soc_of_get_dai_link_codecs(dev, codec, link);