Skip to contentSkip to conversation

ASoC: Intel: Fix cht_bsw_nau8824 machine driver build error

PATCH In review Hans de Goede 2 participants 2 messages Mar 2, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Intel: Fix cht_bsw_nau8824 machine driver build error

The cht_bsw_nau8824 machine driver is passing snd_soc_codec to nau8824_enable_jack_detect(), but that expects a snd_soc_component as argument, causing a compile error.

This commit fixes this.

Fixes 5b00ce63e07f ("ASoC: Intel: add nau8824 sound card")
Cc John Hsu <[email protected]>
---
 sound/soc/intel/boards/cht_bsw_nau8824.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/intel/boards/cht_bsw_nau8824.c +1 -2
index 08d0b8128fab..5913ad159cc1 100644
@@ -103,7 +103,6 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 {
 	struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
 	struct snd_soc_jack *jack = &ctx->jack;
-	struct snd_soc_codec *codec = runtime->codec;
 	struct snd_soc_dai *codec_dai = runtime->codec_dai;
 	int ret, jack_type;
 
@@ -134,7 +133,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
 
-	nau8824_enable_jack_detect(codec, jack);
+	nau8824_enable_jack_detect(codec_dai->component, jack);
 
 	return ret;
 }
Signature · 1 line
2.14.3
maintainer
#1 lore raw
Quoted 3 lines · Hans de Goede

The cht_bsw_nau8824 machine driver is passing snd_soc_codec to nau8824_enable_jack_detect(), but that expects a snd_soc_component as argument, causing a compile error.

Thanks but John already sent a fix for this.