Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f06f136f authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Convert 7x9 write to use cpu_to_be16()



Run the data through cpu_to_be16() so it's at least clear what we're up to.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent 2cdcd951
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -133,12 +133,11 @@ static unsigned int snd_soc_7_9_read(struct snd_soc_codec *codec,
static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
static int snd_soc_7_9_write(struct snd_soc_codec *codec, unsigned int reg,
			     unsigned int value)
			     unsigned int value)
{
{
	u8 data[2];
	u16 data;


	data[0] = (reg << 1) | ((value >> 8) & 0x0001);
	data = cpu_to_be16((reg << 9) | (value & 0x1ff));
	data[1] = value & 0x00ff;


	return do_hw_write(codec, reg, value, data, 2);
	return do_hw_write(codec, reg, value, &data, 2);
}
}


#if defined(CONFIG_SPI_MASTER)
#if defined(CONFIG_SPI_MASTER)