Commit 94228bcf authored by Mark Brown's avatar Mark Brown

ASoC: Use cpu_to_be16() in 8x16 write

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent f06f136f
...@@ -192,10 +192,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg, ...@@ -192,10 +192,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value) unsigned int value)
{ {
u8 data[3]; u8 data[3];
u16 val = cpu_to_be16(value);
data[0] = reg; data[0] = reg;
data[1] = (value >> 8) & 0xff; memcpy(&data[1], &val, sizeof(val));
data[2] = value & 0xff;
return do_hw_write(codec, reg, value, data, 3); return do_hw_write(codec, reg, value, data, 3);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment