ASoC: intel: convert to snd_soc_dapm_xxx()

This patch uses snd_soc_card_to_dapm() to get dapm from card

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87tswv1t9c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-01-09 01:15:11 +00:00 committed by Mark Brown
parent 8978da8e51
commit 850c9884b9
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -40,9 +40,10 @@ static struct snd_soc_dai_link_component tas2563_dai_link_components[] = {
static int tas2563_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_card *card = rtd->card;
struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
int ret;
ret = snd_soc_dapm_new_controls(&card->dapm, tas2563_spk_dapm_widgets,
ret = snd_soc_dapm_new_controls(dapm, tas2563_spk_dapm_widgets,
ARRAY_SIZE(tas2563_spk_dapm_widgets));
if (ret) {
dev_err(rtd->dev, "unable to add dapm widgets, ret %d\n", ret);
@ -56,7 +57,7 @@ static int tas2563_init(struct snd_soc_pcm_runtime *rtd)
return ret;
}
ret = snd_soc_dapm_add_routes(&card->dapm, tas2563_spk_dapm_routes,
ret = snd_soc_dapm_add_routes(dapm, tas2563_spk_dapm_routes,
ARRAY_SIZE(tas2563_spk_dapm_routes));
if (ret)
dev_err(rtd->dev, "unable to add dapm routes, ret %d\n", ret);