提交 bf416910 编写于 作者: J James Ralston 提交者: Wolfram Sang

i2c: ismt: initialize DMA buffer

This patch adds code to initialize the DMA buffer to compensate for
possible hardware data corruption.
Signed-off-by: NJames Ralston <james.d.ralston@intel.com>
[wsa: changed to use 'sizeof']
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 bd63ace4
...@@ -393,6 +393,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr, ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册