mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
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:
parent
94228bcf8c
commit
2ac8b6f41a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue