diff options
author | Alan Horstmann <gineera@aspect135.co.uk> | 2008-09-09 22:25:49 +0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-09-23 10:17:53 +0400 |
commit | 8569be3cf90c279957bafd4e66f1332f041831d3 (patch) | |
tree | 96ca79fb6b309f05a54d36def69015cc3073f7b8 /sound/soc/codecs/wm8731.c | |
parent | 7407a2e4b9e1fb3528bb355a571ee3eb7e32c386 (diff) | |
download | linux-8569be3cf90c279957bafd4e66f1332f041831d3.tar.xz |
sound: ASoC: Fix WM8731 SPI write
Ensure wm8731_spi_write byte order is consistent regardless of
endianess.
Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/codecs/wm8731.c')
-rw-r--r-- | sound/soc/codecs/wm8731.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 975befdfd885..7b64d9a7ff76 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c @@ -688,12 +688,13 @@ static int wm8731_spi_write(struct spi_device *spi, const char *data, int len) { struct spi_transfer t; struct spi_message m; - u16 msg[2]; + u8 msg[2]; if (len <= 0) return 0; - msg[0] = (data[0] << 8) + data[1]; + msg[0] = data[0]; + msg[1] = data[1]; spi_message_init(&m); memset(&t, 0, (sizeof t)); |