aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/alc5623.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/alc5623.c')
-rw-r--r--sound/soc/codecs/alc5623.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index eecffb54894..984b14bcb60 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -40,8 +40,6 @@ MODULE_PARM_DESC(caps_charge, "ALC5623 cap charge time (msecs)");
40/* codec private data */ 40/* codec private data */
41struct alc5623_priv { 41struct alc5623_priv {
42 enum snd_soc_control_type control_type; 42 enum snd_soc_control_type control_type;
43 void *control_data;
44 struct mutex mutex;
45 u8 id; 43 u8 id;
46 unsigned int sysclk; 44 unsigned int sysclk;
47 u16 reg_cache[ALC5623_VENDOR_ID2+2]; 45 u16 reg_cache[ALC5623_VENDOR_ID2+2];
@@ -55,8 +53,10 @@ static void alc5623_fill_cache(struct snd_soc_codec *codec)
55 u16 *cache = codec->reg_cache; 53 u16 *cache = codec->reg_cache;
56 54
57 /* not really efficient ... */ 55 /* not really efficient ... */
56 codec->cache_bypass = 1;
58 for (i = 0 ; i < codec->driver->reg_cache_size ; i += step) 57 for (i = 0 ; i < codec->driver->reg_cache_size ; i += step)
59 cache[i] = codec->hw_read(codec, i); 58 cache[i] = snd_soc_read(codec, i);
59 codec->cache_bypass = 0;
60} 60}
61 61
62static inline int alc5623_reset(struct snd_soc_codec *codec) 62static inline int alc5623_reset(struct snd_soc_codec *codec)
@@ -1050,9 +1050,7 @@ static int alc5623_i2c_probe(struct i2c_client *client,
1050 } 1050 }
1051 1051
1052 i2c_set_clientdata(client, alc5623); 1052 i2c_set_clientdata(client, alc5623);
1053 alc5623->control_data = client;
1054 alc5623->control_type = SND_SOC_I2C; 1053 alc5623->control_type = SND_SOC_I2C;
1055 mutex_init(&alc5623->mutex);
1056 1054
1057 ret = snd_soc_register_codec(&client->dev, 1055 ret = snd_soc_register_codec(&client->dev,
1058 &soc_codec_device_alc5623, &alc5623_dai, 1); 1056 &soc_codec_device_alc5623, &alc5623_dai, 1);