summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJames Ralston <james.d.ralston@intel.com>2013-09-24 16:47:55 -0700
committerWolfram Sang <wsa@the-dreams.de>2013-09-28 16:32:12 +0200
commitbf4169100c909667ede6af67668b3ecce6928343 (patch)
treefc4afe632fdeee15ebaad6db8ef5a86a2bcc2ce2 /drivers/i2c
parentbd63ace4dc4290165bbf3bf546eba50453d0aa9d (diff)
downloadop-kernel-dev-bf4169100c909667ede6af67668b3ecce6928343.zip
op-kernel-dev-bf4169100c909667ede6af67668b3ecce6928343.tar.gz
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ismt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index 8ed79a0..1672eff 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -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);
OpenPOWER on IntegriCloud