26 May
2011
26 May
'11
3:13 p.m.
Signed-off-by: Mark Brown broonie@opensource.wolfsonmicro.com --- 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 47d0a0c..fa8c4de 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c @@ -242,9 +242,9 @@ static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { u8 data[3]; + u16 rval = cpu_to_be16(reg);
- data[0] = (reg >> 8) & 0xff; - data[1] = reg & 0xff; + memcpy(data, &rval, sizeof(rval)); data[2] = value;
return do_hw_write(codec, reg, value, data, 3);
--
1.7.5.1