Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-block.git] / sound / soc / intel / boards / broadwell.c
index ffbb597052aa61ccc3d84fe2e91fdb3d062721c7..acb4e36682cbd6d2a3ce75d64020509162e4f68f 100644 (file)
@@ -70,7 +70,7 @@ static const struct snd_soc_dapm_route broadwell_rt286_map[] = {
 
 static int broadwell_rt286_codec_init(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_component *component = rtd->codec_dai->component;
+       struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
        int ret = 0;
        ret = snd_soc_card_jack_new(rtd->card, "Headset",
                SND_JACK_HEADSET | SND_JACK_BTN_0, &broadwell_headset,
@@ -104,7 +104,7 @@ static int broadwell_rt286_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
        int ret;
 
        ret = snd_soc_dai_set_sysclk(codec_dai, RT286_SCLK_S_PLL, 24000000,
@@ -284,7 +284,7 @@ static int broadwell_audio_probe(struct platform_device *pdev)
        broadwell_rt286.dev = &pdev->dev;
 
        /* override plaform name, if required */
-       mach = (&pdev->dev)->platform_data;
+       mach = pdev->dev.platform_data;
        ret = snd_soc_fixup_dai_links_platform_name(&broadwell_rt286,
                                                    mach->mach_params.platform);
        if (ret)