Skip to content

Commit

Permalink
ASoC: Use cpu_to_be16() in 8x16 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
broonie committed May 27, 2011
1 parent f06f136 commit 94228bc
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 @@ -192,10 +192,10 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
u8 data[3];
u16 val = cpu_to_be16(value);

data[0] = reg;
data[1] = (value >> 8) & 0xff;
data[2] = value & 0xff;
memcpy(&data[1], &val, sizeof(val));

return do_hw_write(codec, reg, value, data, 3);
}
Expand Down

0 comments on commit 94228bc

Please sign in to comment.