i2c: ismt: use correct length when copy buffer
authorFan Du <fan.du@intel.com>
Tue, 16 Sep 2014 09:21:04 +0000 (17:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:11 +0000 (14:52 -0700)
commite7559b0221c2f20ef669b9fa3af35802fb82b232
tree22fbc0a487b9aef66a5ba466fded88aa9fa213b6
parentf486b8ed93220f0ddaae8780cdaed6316d7dccc0
i2c: ismt: use correct length when copy buffer

commit 979bbf7b7ae75cfc06e09d09eda38009a3bdc4a4 upstream.

In block write mode, when encapsulating dma_buffer, first element is
'command', the rest is data buffer, so only copy actual data buffer
starting from block[1] with the size indicating by block[0].

Signed-off-by: Fan Du <fan.du@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-ismt.c