diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 10:39:34 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-21 16:15:41 -0500 |
commit | 9f8cbae4163ab132cd7a56385341efdd41fcd429 (patch) | |
tree | c525c10d575ef2a91055ea952ead9abff5dc4aaa /sound/soc/codecs/wm8985.c | |
parent | 8b71d441f75d180d3174b2e1b649db385552c266 (diff) |
ASoC: wm8985 Don't directly reference the cache data structure
In preparation for conversion to regmap.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8985.c')
-rw-r--r-- | sound/soc/codecs/wm8985.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8985.c b/sound/soc/codecs/wm8985.c index 297119ffec68..bbe19b2ae516 100644 --- a/sound/soc/codecs/wm8985.c +++ b/sound/soc/codecs/wm8985.c | |||
@@ -946,7 +946,6 @@ static int wm8985_probe(struct snd_soc_codec *codec) | |||
946 | size_t i; | 946 | size_t i; |
947 | struct wm8985_priv *wm8985; | 947 | struct wm8985_priv *wm8985; |
948 | int ret; | 948 | int ret; |
949 | u16 *cache; | ||
950 | 949 | ||
951 | wm8985 = snd_soc_codec_get_drvdata(codec); | 950 | wm8985 = snd_soc_codec_get_drvdata(codec); |
952 | 951 | ||
@@ -979,13 +978,13 @@ static int wm8985_probe(struct snd_soc_codec *codec) | |||
979 | goto err_reg_enable; | 978 | goto err_reg_enable; |
980 | } | 979 | } |
981 | 980 | ||
982 | cache = codec->reg_cache; | ||
983 | /* latch volume update bits */ | 981 | /* latch volume update bits */ |
984 | for (i = 0; i < ARRAY_SIZE(volume_update_regs); ++i) | 982 | for (i = 0; i < ARRAY_SIZE(volume_update_regs); ++i) |
985 | cache[volume_update_regs[i]] |= 0x100; | 983 | snd_soc_update_bits(codec, volume_update_regs[i], |
984 | 0x100, 0x100); | ||
986 | /* enable BIASCUT */ | 985 | /* enable BIASCUT */ |
987 | cache[WM8985_BIAS_CTRL] |= WM8985_BIASCUT; | 986 | snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT, |
988 | codec->cache_sync = 1; | 987 | WM8985_BIASCUT); |
989 | 988 | ||
990 | wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 989 | wm8985_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
991 | return 0; | 990 | return 0; |