Skip to content

Commit 0baa2c3

Browse files
morimotobroonie
authored andcommitted
ASoC: simple-card.c: 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/87fs6mdgmc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 14c9b25 commit 0baa2c3

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

sound/soc/generic/simple-card-utils.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,14 +1103,12 @@ int asoc_graph_parse_dai(struct device_node *ep,
11031103
* 2) user need to rebind Sound Card everytime
11041104
* if he unbinded CPU or Codec.
11051105
*/
1106-
ret = snd_soc_get_dai_name(&args, &dlc->dai_name);
1106+
ret = snd_soc_get_dlc(&args, dlc);
11071107
if (ret < 0) {
11081108
of_node_put(node);
11091109
return ret;
11101110
}
11111111

1112-
dlc->of_node = node;
1113-
11141112
if (is_single_link)
11151113
*is_single_link = of_graph_get_endpoint_count(node) == 1;
11161114

sound/soc/generic/simple-card.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,10 @@ static int asoc_simple_parse_dai(struct device_node *node,
8989
* 2) user need to rebind Sound Card everytime
9090
* if he unbinded CPU or Codec.
9191
*/
92-
ret = snd_soc_of_get_dai_name(node, &dlc->dai_name, 0);
92+
ret = snd_soc_get_dlc(&args, dlc);
9393
if (ret < 0)
9494
return ret;
9595

96-
dlc->of_node = args.np;
97-
9896
if (is_single_link)
9997
*is_single_link = !args.args_count;
10098

0 commit comments

Comments
 (0)