From: Alan Horstmann Date: Tue, 9 Sep 2008 18:25:49 +0000 (+0100) Subject: sound: ASoC: Fix WM8731 SPI write X-Git-Tag: v2.6.28-rc1~720^2~60 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8569be3cf90c279957bafd4e66f1332f041831d3;p=linux-2.6-omap-h63xx.git sound: ASoC: Fix WM8731 SPI write Ensure wm8731_spi_write byte order is consistent regardless of endianess. Signed-off-by: Alan Horstmann Signed-off-by: Mark Brown Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 975befdfd88..7b64d9a7ff7 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));