Commit 85af2a66 authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

ASoC: Intel: Skylake: 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 b590d5e2
...@@ -35,12 +35,10 @@ static struct snd_soc_card skylake_audio_card; ...@@ -35,12 +35,10 @@ static struct snd_soc_card skylake_audio_card;
static inline struct snd_soc_dai *skl_get_codec_dai(struct snd_soc_card *card) static inline struct snd_soc_dai *skl_get_codec_dai(struct snd_soc_card *card)
{ {
int i;
for (i = 0; i < card->num_rtd; i++) {
struct snd_soc_pcm_runtime *rtd; struct snd_soc_pcm_runtime *rtd;
rtd = card->rtd + i; list_for_each_entry(rtd, &card->rtd_list, list) {
if (!strncmp(rtd->codec_dai->name, SKL_NUVOTON_CODEC_DAI, if (!strncmp(rtd->codec_dai->name, SKL_NUVOTON_CODEC_DAI,
strlen(SKL_NUVOTON_CODEC_DAI))) strlen(SKL_NUVOTON_CODEC_DAI)))
return rtd->codec_dai; return rtd->codec_dai;
......
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