diff options
author | Barry Song <barry.song@analog.com> | 2011-06-15 15:29:22 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-06-16 06:42:10 -0400 |
commit | 5d0e7f61702ea562ee8bdea56b475978c4ff08ac (patch) | |
tree | 401fc05422854e7d2072b0d2f79987ba3ee1941e /sound/soc/codecs/ad1836.c | |
parent | 0679059a41413069d887a03c5db1c98dc273d6a3 (diff) |
ASoC: AD1836: rename suspend/resume funcs
Use less specific names for suspend/resume to match the probe/remove funcs
where these are now used.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Scott Jiang <scott.jiang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ad1836.c')
-rw-r--r-- | sound/soc/codecs/ad1836.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 9cc6123cf7ea..4e5c5726366b 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c | |||
@@ -189,26 +189,6 @@ static int ad1836_hw_params(struct snd_pcm_substream *substream, | |||
189 | return 0; | 189 | return 0; |
190 | } | 190 | } |
191 | 191 | ||
192 | #ifdef CONFIG_PM | ||
193 | static int ad1836_soc_suspend(struct snd_soc_codec *codec, | ||
194 | pm_message_t state) | ||
195 | { | ||
196 | /* reset clock control mode */ | ||
197 | return snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | ||
198 | AD1836_ADC_SERFMT_MASK, 0); | ||
199 | } | ||
200 | |||
201 | static int ad1836_soc_resume(struct snd_soc_codec *codec) | ||
202 | { | ||
203 | /* restore clock control mode */ | ||
204 | return snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | ||
205 | AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX); | ||
206 | } | ||
207 | #else | ||
208 | #define ad1836_soc_suspend NULL | ||
209 | #define ad1836_soc_resume NULL | ||
210 | #endif | ||
211 | |||
212 | static struct snd_soc_dai_ops ad1836_dai_ops = { | 192 | static struct snd_soc_dai_ops ad1836_dai_ops = { |
213 | .hw_params = ad1836_hw_params, | 193 | .hw_params = ad1836_hw_params, |
214 | .set_fmt = ad1836_set_dai_fmt, | 194 | .set_fmt = ad1836_set_dai_fmt, |
@@ -242,6 +222,25 @@ static struct snd_soc_dai_driver ad183x_dais[] = { | |||
242 | [AD1838] = AD183X_DAI("ad1838", 3, 1), | 222 | [AD1838] = AD183X_DAI("ad1838", 3, 1), |
243 | }; | 223 | }; |
244 | 224 | ||
225 | #ifdef CONFIG_PM | ||
226 | static int ad1836_suspend(struct snd_soc_codec *codec, pm_message_t state) | ||
227 | { | ||
228 | /* reset clock control mode */ | ||
229 | return snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | ||
230 | AD1836_ADC_SERFMT_MASK, 0); | ||
231 | } | ||
232 | |||
233 | static int ad1836_resume(struct snd_soc_codec *codec) | ||
234 | { | ||
235 | /* restore clock control mode */ | ||
236 | return snd_soc_update_bits(codec, AD1836_ADC_CTRL2, | ||
237 | AD1836_ADC_SERFMT_MASK, AD1836_ADC_AUX); | ||
238 | } | ||
239 | #else | ||
240 | #define ad1836_suspend NULL | ||
241 | #define ad1836_resume NULL | ||
242 | #endif | ||
243 | |||
245 | static int ad1836_probe(struct snd_soc_codec *codec) | 244 | static int ad1836_probe(struct snd_soc_codec *codec) |
246 | { | 245 | { |
247 | struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); | 246 | struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); |
@@ -324,8 +323,8 @@ static int ad1836_remove(struct snd_soc_codec *codec) | |||
324 | static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { | 323 | static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { |
325 | .probe = ad1836_probe, | 324 | .probe = ad1836_probe, |
326 | .remove = ad1836_remove, | 325 | .remove = ad1836_remove, |
327 | .suspend = ad1836_soc_suspend, | 326 | .suspend = ad1836_suspend, |
328 | .resume = ad1836_soc_resume, | 327 | .resume = ad1836_resume, |
329 | .reg_cache_size = AD1836_NUM_REGS, | 328 | .reg_cache_size = AD1836_NUM_REGS, |
330 | .reg_word_size = sizeof(u16), | 329 | .reg_word_size = sizeof(u16), |
331 | 330 | ||