diff options
author | James Ralston <james.d.ralston@intel.com> | 2013-09-25 03:47:55 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-04 16:31:06 +0400 |
commit | fe0051d83cb951fbeab6712633ca2e31de22ee11 (patch) | |
tree | 994d50926818445cab51f59bf6ed9140d3f60815 /drivers/i2c/busses/i2c-ismt.c | |
parent | 2d99b6dd66b5778d92fc411b48037084528e1ae2 (diff) | |
download | linux-fe0051d83cb951fbeab6712633ca2e31de22ee11.tar.xz |
i2c: ismt: initialize DMA buffer
commit bf4169100c909667ede6af67668b3ecce6928343 upstream.
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>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-ismt.c')
-rw-r--r-- | drivers/i2c/busses/i2c-ismt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index cd82eb44e4c4..7c9f053556f2 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); |