i2c: ismt: initialize DMA buffer
This patch adds code to initialize the DMA buffer to compensate for possible hardware data corruption. Signed-off-by: James Ralston <james.d.ralston@intel.com> [wsa: changed to use 'sizeof'] Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
bd63ace4dc
commit
bf4169100c
1 changed files with 3 additions and 0 deletions
|
@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
|
||||||
|
|
||||||
desc = &priv->hw[priv->head];
|
desc = &priv->hw[priv->head];
|
||||||
|
|
||||||
|
/* Initialize the DMA buffer */
|
||||||
|
memset(priv->dma_buffer, 0, sizeof(priv->dma_buffer));
|
||||||
|
|
||||||
/* Initialize the descriptor */
|
/* Initialize the descriptor */
|
||||||
memset(desc, 0, sizeof(struct ismt_desc));
|
memset(desc, 0, sizeof(struct ismt_desc));
|
||||||
desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write);
|
desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write);
|
||||||
|
|
Loading…
Reference in a new issue