Commit 2ac8b6f4 authored by Mark Brown's avatar Mark Brown

ASoC: Use explicit endianness conversion in snd_soc_16_8_write()

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 94228bcf
......@@ -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;
......
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