提交 2ac8b6f4 编写于 作者: M Mark Brown

ASoC: Use explicit endianness conversion in snd_soc_16_8_write()

Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@ti.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册