mirror of
https://github.com/torvalds/linux.git
synced 2026-09-12 20:53:03 +02:00
ASoC: generic: Card name parsing should be called after xxx_for_each_link()
"tidyup simple_util_parse_xxx() in xxx_parse_of()" commit changed the function call order. But simple_util_parse_card_name() should be called after dai_link settings, because it might use dai_link->name as card->name. Fixes:fa6222d5e1("ASoC: audio-graph-card2: tidyup simple_util_parse_xxx() in audio_graph2_parse_of()") Fixes:b8081307f5("ASoC: audio-graph-card: tidyup simple_util_parse_xxx() in audio_graph_parse_of()") Fixes:27ecf4da5a("ASoC: simple-card: tidyup simple_util_parse_xxx() in simple_parse_of()") Reported-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/b81ebfa2-6a35-4ff0-9d04-b867233eda4d@sirena.org.uk Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20260714103428.2318895-1-geert+renesas@glider.be Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/87zezt0zlw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
567a5c8664
commit
73080a7976
|
|
@ -587,10 +587,6 @@ int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev)
|
|||
if (ret < 0)
|
||||
goto end;
|
||||
|
||||
ret = simple_util_parse_card_name(priv, NULL);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
memset(li, 0, sizeof(*li));
|
||||
ret = graph_for_each_link(priv, li,
|
||||
graph_dai_link_of,
|
||||
|
|
@ -598,6 +594,11 @@ int audio_graph_parse_of(struct simple_util_priv *priv, struct device *dev)
|
|||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
/* Card name should be set after graph_for_each_link() */
|
||||
ret = simple_util_parse_card_name(priv, NULL);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
snd_soc_card_set_drvdata(card, priv);
|
||||
|
||||
simple_util_debug_info(priv);
|
||||
|
|
|
|||
|
|
@ -1344,10 +1344,6 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
|
|||
if (ret < 0)
|
||||
goto end;
|
||||
|
||||
ret = simple_util_parse_card_name(priv, NULL);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = simple_util_parse_aux_devs(priv, NULL);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
|
@ -1357,6 +1353,11 @@ int audio_graph2_parse_of(struct simple_util_priv *priv, struct device *dev,
|
|||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
/* Card name should be set after graph_for_each_link() */
|
||||
ret = simple_util_parse_card_name(priv, NULL);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
snd_soc_card_set_drvdata(card, priv);
|
||||
|
||||
if ((hooks) && (hooks)->hook_post) {
|
||||
|
|
|
|||
|
|
@ -704,10 +704,6 @@ static int simple_parse_of(struct simple_util_priv *priv)
|
|||
if (ret < 0)
|
||||
goto end;
|
||||
|
||||
ret = simple_util_parse_card_name(priv, PREFIX);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = simple_util_parse_aux_devs(priv, PREFIX);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
|
@ -720,6 +716,11 @@ static int simple_parse_of(struct simple_util_priv *priv)
|
|||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
/* Card name should be set after simple_for_each_link() */
|
||||
ret = simple_util_parse_card_name(priv, PREFIX);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = simple_populate_aux(priv);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user