aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-cache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index 6947ebcf475..1e06c32708f 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -107,12 +107,11 @@ static unsigned int snd_soc_7_9_read(struct snd_soc_codec *codec,
107static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg, 107static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
108 unsigned int value) 108 unsigned int value)
109{ 109{
110 u8 data[2]; 110 u16 data;
111 111
112 data[0] = (reg << 1) | ((value >> 8) & 0x0001); 112 data = cpu_to_be16((reg << 9) | (value & 0x1ff));
113 data[1] = value & 0x00ff;
114 113
115 return do_hw_write(codec, reg, value, data, 2); 114 return do_hw_write(codec, reg, value, &data, 2);
116} 115}
117 116
118static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg, 117static int snd_soc_8_8_write(struct snd_soc_codec *codec, unsigned int reg,