From 0e36cc145a2cba4f6e98001c4c810c35a8d84c89 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 11 May 2011 15:15:56 +0200 Subject: [PATCH] --- yaml --- r: 257476 b: refs/heads/master c: 2ac8b6f41a6886dacc88c15c8742e7cd2e40ca7e h: refs/heads/master 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 fac9e3a1866c..3b31f8226fc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 94228bcf8c85cfb824e15485285ceb4d5cf080fe +refs/heads/master: 2ac8b6f41a6886dacc88c15c8742e7cd2e40ca7e diff --git a/trunk/sound/soc/soc-cache.c b/trunk/sound/soc/soc-cache.c index 9c688b8a1f91..d1d4059be04e 100644 --- a/trunk/sound/soc/soc-cache.c +++ b/trunk/sound/soc/soc-cache.c @@ -314,9 +314,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; reg &= 0xff;