diff options
-rw-r--r-- | sound/soc/soc-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index dab109f2f47d..9c688b8a1f91 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
@@ -192,10 +192,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg, | |||
192 | unsigned int value) | 192 | unsigned int value) |
193 | { | 193 | { |
194 | u8 data[3]; | 194 | u8 data[3]; |
195 | u16 val = cpu_to_be16(value); | ||
195 | 196 | ||
196 | data[0] = reg; | 197 | data[0] = reg; |
197 | data[1] = (value >> 8) & 0xff; | 198 | memcpy(&data[1], &val, sizeof(val)); |
198 | data[2] = value & 0xff; | ||
199 | 199 | ||
200 | return do_hw_write(codec, reg, value, data, 3); | 200 | return do_hw_write(codec, reg, value, data, 3); |
201 | } | 201 | } |