diff mbox

ASoC: Intel: Fix cht_bsw_nau8824 machine driver build error

Message ID 20180302102258.10081-1-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans de Goede March 2, 2018, 10:22 a.m. UTC
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 <KCHSU0@nuvoton.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 sound/soc/intel/boards/cht_bsw_nau8824.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown March 2, 2018, 11:32 a.m. UTC | #1
On Fri, Mar 02, 2018 at 11:22:58AM +0100, Hans de Goede wrote:
> 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.
diff mbox

Patch

diff --git a/sound/soc/intel/boards/cht_bsw_nau8824.c b/sound/soc/intel/boards/cht_bsw_nau8824.c
index 08d0b8128fab..5913ad159cc1 100644
--- a/sound/soc/intel/boards/cht_bsw_nau8824.c
+++ b/sound/soc/intel/boards/cht_bsw_nau8824.c
@@ -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;
 }