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

Commit bf416910 authored by James Ralston's avatar James Ralston Committed by Wolfram Sang
Browse files

i2c: ismt: initialize DMA buffer



This patch adds code to initialize the DMA buffer to compensate for
possible hardware data corruption.

Signed-off-by: default avatarJames Ralston <james.d.ralston@intel.com>
[wsa: changed to use 'sizeof']
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent bd63ace4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,

	desc = &priv->hw[priv->head];

	/* Initialize the DMA buffer */
	memset(priv->dma_buffer, 0, sizeof(priv->dma_buffer));

	/* Initialize the descriptor */
	memset(desc, 0, sizeof(struct ismt_desc));
	desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write);