Unverified Commit 2b34c135 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: soc-topology.c: use helper function



Current ASoC has many helper function.
This patch use it.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87edrbea20.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e15ff262
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1436,7 +1436,7 @@ static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,

	/* card dapm mutex is held by the core if we are loading topology
	 * data during sound card init. */
	if (card->instantiated)
	if (snd_soc_card_is_instantiated(card))
		widget = snd_soc_dapm_new_control(dapm, &template);
	else
		widget = snd_soc_dapm_new_control_unlocked(dapm, &template);
@@ -1525,7 +1525,7 @@ static int soc_tplg_dapm_complete(struct soc_tplg *tplg)
	/* Card might not have been registered at this point.
	 * If so, just return success.
	*/
	if (!card || !card->instantiated) {
	if (!snd_soc_card_is_instantiated(card)) {
		dev_warn(tplg->dev, "ASoC: Parent card not yet available,"
			" widget card binding deferred\n");
		return 0;