]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i2c: adv7511: fixup the dapm bias level access
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Wed, 16 Sep 2015 12:03:39 +0000 (13:03 +0100)
committerSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Mon, 11 Jan 2016 09:54:44 +0000 (09:54 +0000)
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
drivers/gpu/drm/i2c/adv7511_audio.c

index 1f735470195d34e4b517f204c22349f0379f0348..52019e95d00703bfa729be77fc5832722db39d9f 100644 (file)
@@ -198,6 +198,7 @@ static int adv7511_set_bias_level(struct snd_soc_codec *codec,
                                  enum snd_soc_bias_level level)
 {
        struct adv7511 *adv7511 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
        switch (level) {
        case SND_SOC_BIAS_ON:
@@ -212,7 +213,7 @@ static int adv7511_set_bias_level(struct snd_soc_codec *codec,
                }
                break;
        case SND_SOC_BIAS_PREPARE:
-               if (codec->dapm.bias_level == SND_SOC_BIAS_STANDBY) {
+               if (dapm->bias_level == SND_SOC_BIAS_STANDBY) {
                        adv7511_packet_enable(adv7511,
                                        ADV7511_PACKET_ENABLE_AUDIO_SAMPLE);
                        adv7511_packet_enable(adv7511,
@@ -235,7 +236,7 @@ static int adv7511_set_bias_level(struct snd_soc_codec *codec,
        case SND_SOC_BIAS_OFF:
                break;
        }
-       codec->dapm.bias_level = level;
+       dapm->bias_level = level;
        return 0;
 }