| Index: sound/soc/codecs/wm8523.c
|
| diff --git a/sound/soc/codecs/wm8523.c b/sound/soc/codecs/wm8523.c
|
| index deca79ea2b4b98ab6d3232c9cb3c1b4c3e6858dd..4fd4d8dca0fc0af31439371fbab9040794162095 100644
|
| --- a/sound/soc/codecs/wm8523.c
|
| +++ b/sound/soc/codecs/wm8523.c
|
| @@ -24,7 +24,6 @@
|
| #include <sound/pcm.h>
|
| #include <sound/pcm_params.h>
|
| #include <sound/soc.h>
|
| -#include <sound/soc-dapm.h>
|
| #include <sound/initval.h>
|
| #include <sound/tlv.h>
|
|
|
| @@ -59,7 +58,7 @@ static const u16 wm8523_reg[WM8523_REGISTER_COUNT] = {
|
| 0x0000, /* R8 - ZERO_DETECT */
|
| };
|
|
|
| -static int wm8523_volatile_register(unsigned int reg)
|
| +static int wm8523_volatile_register(struct snd_soc_codec *codec, unsigned int reg)
|
| {
|
| switch (reg) {
|
| case WM8523_DEVICE_ID:
|
| @@ -109,10 +108,11 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|
|
| static int wm8523_add_widgets(struct snd_soc_codec *codec)
|
| {
|
| - snd_soc_dapm_new_controls(codec, wm8523_dapm_widgets,
|
| - ARRAY_SIZE(wm8523_dapm_widgets));
|
| + struct snd_soc_dapm_context *dapm = &codec->dapm;
|
|
|
| - snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
|
| + snd_soc_dapm_new_controls(dapm, wm8523_dapm_widgets,
|
| + ARRAY_SIZE(wm8523_dapm_widgets));
|
| + snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
|
|
|
| return 0;
|
| }
|
| @@ -327,7 +327,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,
|
| break;
|
|
|
| case SND_SOC_BIAS_STANDBY:
|
| - if (codec->bias_level == SND_SOC_BIAS_OFF) {
|
| + if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
|
| ret = regulator_bulk_enable(ARRAY_SIZE(wm8523->supplies),
|
| wm8523->supplies);
|
| if (ret != 0) {
|
| @@ -366,7 +366,7 @@ static int wm8523_set_bias_level(struct snd_soc_codec *codec,
|
| wm8523->supplies);
|
| break;
|
| }
|
| - codec->bias_level = level;
|
| + codec->dapm.bias_level = level;
|
| return 0;
|
| }
|
|
|
| @@ -414,7 +414,6 @@ static int wm8523_resume(struct snd_soc_codec *codec)
|
| static int wm8523_probe(struct snd_soc_codec *codec)
|
| {
|
| struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec);
|
| - u16 *reg_cache = codec->reg_cache;
|
| int ret, i;
|
|
|
| codec->hw_write = (hw_write_t)i2c_master_send;
|
| @@ -471,8 +470,9 @@ static int wm8523_probe(struct snd_soc_codec *codec)
|
| }
|
|
|
| /* Change some default settings - latch VU and enable ZC */
|
| - reg_cache[WM8523_DAC_GAINR] |= WM8523_DACR_VU;
|
| - reg_cache[WM8523_DAC_CTRL3] |= WM8523_ZC;
|
| + snd_soc_update_bits(codec, WM8523_DAC_GAINR,
|
| + WM8523_DACR_VU, WM8523_DACR_VU);
|
| + snd_soc_update_bits(codec, WM8523_DAC_CTRL3, WM8523_ZC, WM8523_ZC);
|
|
|
| wm8523_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
|
|
|