i2cdump: don't read block data in non-block modes
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 27 Oct 2015 16:15:02 +0000 (17:15 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 1 Nov 2015 19:55:09 +0000 (20:55 +0100)
commit1cde5f79d4c077cd6a2a8998a9180dfcc2800852
tree89f1ae0737123a707637d6e0e364f77c55ced326
parentfc8eb056ea8b81798467f8306629a7ea1feffe50
i2cdump: don't read block data in non-block modes

We currently read data twice in byte mode. Add a check to avoid calling
i2c_smbus_read_i2c_block_data() if we're not in I2C or SMBus block mode.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/i2c_tools.c