From a1d79690bd209882b9b3e04474f939a395a26455 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 11 May 2011 11:18:00 +0200 Subject: [PATCH] --- yaml --- r: 257475 b: refs/heads/master c: 94228bcf8c85cfb824e15485285ceb4d5cf080fe h: refs/heads/master i: 257473: 46aac46e58c4aca84058cc306f0132d623fb432a 257471: 567dfc516f443d37877720ed5a6bc322b3a13d72 v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-cache.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5a5a41ba53c4..fac9e3a1866c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f06f136fe0217174657e325279672d4b73ed4d87 +refs/heads/master: 94228bcf8c85cfb824e15485285ceb4d5cf080fe diff --git a/trunk/sound/soc/soc-cache.c b/trunk/sound/soc/soc-cache.c index dab109f2f47d..9c688b8a1f91 100644 --- a/trunk/sound/soc/soc-cache.c +++ b/trunk/sound/soc/soc-cache.c @@ -192,10 +192,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { u8 data[3]; + u16 val = cpu_to_be16(value); data[0] = reg; - data[1] = (value >> 8) & 0xff; - data[2] = value & 0xff; + memcpy(&data[1], &val, sizeof(val)); return do_hw_write(codec, reg, value, data, 3); }