Use I2C_READ_OP_P() rather than negating I2C_WRITE_OP_P()

This commit is contained in:
pgoyette 2018-02-27 05:52:10 +00:00
parent 88c5eab4ef
commit d691638539
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ imcsmb_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, const void *cmdbuf,
}
/* For a read operation, copy the data out */
if (! I2C_OP_WRITE_P(op)) {
if (I2C_OP_READ_P(op)) {
if (len == 2) {
/* The data is returned in bits [15:0]; as discussed
* above, byte-swap.