diff mbox series

[v2,9/9] ASoC: simple-card.c: use snd_soc_{of_}get_dlc()

Message ID 87zg4vc80r.wl-kuninori.morimoto.gx@renesas.com
State Accepted
Commit 0baa2c3abc525c79c21ce64a1722f4034d042ac9
Headers show
Series [v2,1/9] ASoC: soc-core.c: add snd_soc_{of_}get_dlc() | expand

Commit Message

Kuninori Morimoto June 20, 2023, 12:05 a.m. UTC
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>
---
 sound/soc/generic/simple-card-utils.c | 4 +---
 sound/soc/generic/simple-card.c       | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 3af056026fa2..3019626b0592 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -1103,14 +1103,12 @@  int asoc_graph_parse_dai(struct device_node *ep,
 	 * 2) user need to rebind Sound Card everytime
 	 *    if he unbinded CPU or Codec.
 	 */
-	ret = snd_soc_get_dai_name(&args, &dlc->dai_name);
+	ret = snd_soc_get_dlc(&args, dlc);
 	if (ret < 0) {
 		of_node_put(node);
 		return ret;
 	}
 
-	dlc->of_node = node;
-
 	if (is_single_link)
 		*is_single_link = of_graph_get_endpoint_count(node) == 1;
 
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 5b59198a0384..0745bf6a09aa 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -89,12 +89,10 @@  static int asoc_simple_parse_dai(struct device_node *node,
 	 * 2) user need to rebind Sound Card everytime
 	 *    if he unbinded CPU or Codec.
 	 */
-	ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0);
+	ret = snd_soc_get_dlc(&args, dlc);
 	if (ret < 0)
 		return ret;
 
-	dlc->of_node = args.np;
-
 	if (is_single_link)
 		*is_single_link = !args.args_count;