From: Fred Oh Date: Thu, 25 Jun 2020 19:24:58 +0000 (-0500) Subject: ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec X-Git-Tag: v5.9-rc1~120^2~9^2^2~135 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec0d0f6342d460e75e77c41840d1420e3ba1b69d;p=thirdparty%2Fkernel%2Flinux.git ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec dailink.codecs is pointer to a codec array. Explicitly access first codec's dai_name. Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200625192458.4148-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/boards/cml_rt1011_rt5682.c b/sound/soc/intel/boards/cml_rt1011_rt5682.c index 3f8b7d9820cdc..6943020fa0bd4 100644 --- a/sound/soc/intel/boards/cml_rt1011_rt5682.c +++ b/sound/soc/intel/boards/cml_rt1011_rt5682.c @@ -556,7 +556,7 @@ static int snd_cml_rt1011_probe(struct platform_device *pdev) if (sof_rt1011_quirk & (SOF_RT1011_SPEAKER_TL | SOF_RT1011_SPEAKER_TR)) { for_each_card_prelinks(&snd_soc_card_cml, i, dai_link) { - if (!strcmp(dai_link->codecs->dai_name, + if (!strcmp(dai_link->codecs[0].dai_name, CML_RT1011_CODEC_DAI)) { dai_link->codecs = ssp1_codec_4spk; dai_link->num_codecs = ARRAY_SIZE(ssp1_codec_4spk);