diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-05-11 09:42:35 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-05-30 13:49:04 -0700 |
commit | 912e0380296e2beff83cf05224be7a323452382c (patch) | |
tree | 07347deaebc2903679e6fcebee38fc93d3640d86 /sound | |
parent | ae56e9df89155df49346526e7000004dec84ebef (diff) |
ASoC: sgtl5000: Replace direct snd_soc_codec dapm field access
The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to
codec->dapm.bias_level with snd_soc_codec_get_bias_level().
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 8533eb24a9515c2a9e6779cfd377ab0c46ed8a77)
cherry-picked to have less conflicts for other cherry-picks. Provide
required function locally.
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index fa307fe4e15e..f812886f6d49 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -143,6 +143,11 @@ struct sgtl5000_priv { u8 micbias_voltage; }; +static int snd_soc_codec_get_bias_level(struct snd_soc_codec *codec) +{ + return codec->dapm.bias_level; +} + /* * mic_bias power on/off share the same register bits with * output impedance of mic bias, when power on mic bias, we @@ -956,7 +961,7 @@ static int sgtl5000_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_PREPARE: break; case SND_SOC_BIAS_STANDBY: - if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { + if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { ret = regulator_bulk_enable( ARRAY_SIZE(sgtl5000->supplies), sgtl5000->supplies); |