ASoC: smdk_wm8580: Pass card DAPM context to snd_soc_dapm_disable_pin()
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 16 Jan 2015 13:34:53 +0000 (14:34 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 16 Jan 2015 16:59:36 +0000 (16:59 +0000)
The "MicIn" widget is a card level DAPM element so pass the card's DAPM
context instead of the CODEC's DAPM context to snd_soc_dapm_disable_pin().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/smdk_wm8580.c

index 17a2f717ec029c7e3b80ddf00e8782306d763d21..548bfd9937889dbe43df8a28ec3d6de9a3d568b1 100644 (file)
@@ -136,13 +136,10 @@ static const struct snd_soc_dapm_route smdk_wm8580_audio_map[] = {
 
 static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_codec *codec = rtd->codec;
-       struct snd_soc_dapm_context *dapm = &codec->dapm;
-
        /* Enabling the microphone requires the fitting of a 0R
         * resistor to connect the line from the microphone jack.
         */
-       snd_soc_dapm_disable_pin(dapm, "MicIn");
+       snd_soc_dapm_disable_pin(&rtd->card->dapm, "MicIn");
 
        return 0;
 }