aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-24 15:59:28 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:14 -0400
commit7f62d91f5ad5a89993b060f29172fe08694850f2 (patch)
treea6ea4c7c96094757d0005bb9eb5bf0f1270755fb
parentef1f4da5ee01f56eb169015c931f83551cdc0dc7 (diff)
Subject: [PATCH 006/104] ASoC: Use cpu_to_be16() in 8x16 write
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
-rw-r--r--sound/soc/soc-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
index 1e06c32708f..b2c1f5c53d9 100644
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -136,10 +136,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
136 unsigned int value) 136 unsigned int value)
137{ 137{
138 u8 data[3]; 138 u8 data[3];
139 u16 val = cpu_to_be16(value);
139 140
140 data[0] = reg; 141 data[0] = reg;
141 data[1] = (value >> 8) & 0xff; 142 memcpy(&data[1], &val, sizeof(val));
142 data[2] = value & 0xff;
143 143
144 return do_hw_write(codec, reg, value, data, 3); 144 return do_hw_write(codec, reg, value, data, 3);
145} 145}