Commit abd657b1 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: fsl-asoc-card: Update the rtd query

sound card rtd was an array and was updated to a list so update
the driver to use a list
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1a497983
...@@ -417,14 +417,16 @@ static int fsl_asoc_card_audmux_init(struct device_node *np, ...@@ -417,14 +417,16 @@ static int fsl_asoc_card_audmux_init(struct device_node *np,
static int fsl_asoc_card_late_probe(struct snd_soc_card *card) static int fsl_asoc_card_late_probe(struct snd_soc_card *card)
{ {
struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card); struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card);
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai; struct snd_soc_pcm_runtime *rtd = list_first_entry(
&card->rtd_list, struct snd_soc_pcm_runtime, list);
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct codec_priv *codec_priv = &priv->codec_priv; struct codec_priv *codec_priv = &priv->codec_priv;
struct device *dev = card->dev; struct device *dev = card->dev;
int ret; int ret;
if (fsl_asoc_card_is_ac97(priv)) { if (fsl_asoc_card_is_ac97(priv)) {
#if IS_ENABLED(CONFIG_SND_AC97_CODEC) #if IS_ENABLED(CONFIG_SND_AC97_CODEC)
struct snd_soc_codec *codec = card->rtd[0].codec; struct snd_soc_codec *codec = rtd->codec;
struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment