ASoC: Use explicit endianness conversion in snd_soc_16_8_write()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
Mark Brown 2011-05-11 15:15:56 +02:00
parent 94228bcf8c
commit 2ac8b6f41a

View File

@ -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;