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

Commit 27533df8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Takashi Iwai
Browse files

ALSA: cs5535 - Fix an endianness conversion



desc->size is supposed to be a le16 type.  On a big endian system the
current code will set ->size to zero.  We fixed a similar bug
on the next line but missed this one.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent dbd1b547
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -148,7 +148,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
		struct cs5535audio_dma_desc *desc =
		struct cs5535audio_dma_desc *desc =
			&((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
			&((struct cs5535audio_dma_desc *) dma->desc_buf.area)[i];
		desc->addr = cpu_to_le32(addr);
		desc->addr = cpu_to_le32(addr);
		desc->size = cpu_to_le32(period_bytes);
		desc->size = cpu_to_le16(period_bytes);
		desc->ctlreserved = cpu_to_le16(PRD_EOP);
		desc->ctlreserved = cpu_to_le16(PRD_EOP);
		desc_addr += sizeof(struct cs5535audio_dma_desc);
		desc_addr += sizeof(struct cs5535audio_dma_desc);
		addr += period_bytes;
		addr += period_bytes;