aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8994.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2011-01-13 07:20:37 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-01-13 09:17:43 -0500
commitd4754ec91c7b094298f0b2ba02327e6887671edc (patch)
tree82fe1a8e9ae2ad16b53d82a9403c181f753911d0 /sound/soc/codecs/wm8994.c
parent066d16c3e8194677a9aaeb06a45e4014387d16f1 (diff)
ASoC: Update users of readable_register()/volatile_register()
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r--sound/soc/codecs/wm8994.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 247a6a99feb8..0bb0bb40b842 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -109,7 +109,7 @@ struct wm8994_priv {
109 struct wm8994_pdata *pdata; 109 struct wm8994_pdata *pdata;
110}; 110};
111 111
112static int wm8994_readable(unsigned int reg) 112static int wm8994_readable(struct snd_soc_codec *codec, unsigned int reg)
113{ 113{
114 switch (reg) { 114 switch (reg) {
115 case WM8994_GPIO_1: 115 case WM8994_GPIO_1:
@@ -136,7 +136,7 @@ static int wm8994_readable(unsigned int reg)
136 return wm8994_access_masks[reg].readable != 0; 136 return wm8994_access_masks[reg].readable != 0;
137} 137}
138 138
139static int wm8994_volatile(unsigned int reg) 139static int wm8994_volatile(struct snd_soc_codec *codec, unsigned int reg)
140{ 140{
141 if (reg >= WM8994_CACHE_SIZE) 141 if (reg >= WM8994_CACHE_SIZE)
142 return 1; 142 return 1;
@@ -164,7 +164,7 @@ static int wm8994_write(struct snd_soc_codec *codec, unsigned int reg,
164 164
165 BUG_ON(reg > WM8994_MAX_REGISTER); 165 BUG_ON(reg > WM8994_MAX_REGISTER);
166 166
167 if (!wm8994_volatile(reg)) { 167 if (!wm8994_volatile(codec, reg)) {
168 ret = snd_soc_cache_write(codec, reg, value); 168 ret = snd_soc_cache_write(codec, reg, value);
169 if (ret != 0) 169 if (ret != 0)
170 dev_err(codec->dev, "Cache write to %x failed: %d\n", 170 dev_err(codec->dev, "Cache write to %x failed: %d\n",
@@ -182,7 +182,7 @@ static unsigned int wm8994_read(struct snd_soc_codec *codec,
182 182
183 BUG_ON(reg > WM8994_MAX_REGISTER); 183 BUG_ON(reg > WM8994_MAX_REGISTER);
184 184
185 if (!wm8994_volatile(reg) && wm8994_readable(reg) && 185 if (!wm8994_volatile(codec, reg) && wm8994_readable(codec, reg) &&
186 reg < codec->driver->reg_cache_size) { 186 reg < codec->driver->reg_cache_size) {
187 ret = snd_soc_cache_read(codec, reg, &val); 187 ret = snd_soc_cache_read(codec, reg, &val);
188 if (ret >= 0) 188 if (ret >= 0)
@@ -2943,7 +2943,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
2943 /* Read our current status back from the chip - we don't want to 2943 /* Read our current status back from the chip - we don't want to
2944 * reset as this may interfere with the GPIO or LDO operation. */ 2944 * reset as this may interfere with the GPIO or LDO operation. */
2945 for (i = 0; i < WM8994_CACHE_SIZE; i++) { 2945 for (i = 0; i < WM8994_CACHE_SIZE; i++) {
2946 if (!wm8994_readable(i) || wm8994_volatile(i)) 2946 if (!wm8994_readable(codec, i) || wm8994_volatile(codec, i))
2947 continue; 2947 continue;
2948 2948
2949 ret = wm8994_reg_read(codec->control_data, i); 2949 ret = wm8994_reg_read(codec->control_data, i);