Skip to content

Commit

Permalink
ASoC: Use explicit endianness conversion in snd_soc_16_8_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
  • Loading branch information
Mark Brown committed May 27, 2011
1 parent 94228bc commit 2ac8b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2ac8b6f

Please sign in to comment.