i2c: octeon: Prevent error message on bus error
authorJan Glauber <jglauber@cavium.com>
Tue, 27 Feb 2018 15:42:13 +0000 (16:42 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 2 Mar 2018 10:11:15 +0000 (11:11 +0100)
commit7c4246797b84e55e2dfaaf8a18033de9df7c18c1
tree0b330bd0142741696b6bc8abaa973c46f945fcb2
parent1a0e3a35c651b56db59a28b5f693cdf9d4582b56
i2c: octeon: Prevent error message on bus error

The error message:

[Fri Feb 16 13:42:13 2018] i2c-thunderx 0000:01:09.4: unhandled state: 0

is mis-leading as state 0 (bus error) is not an unknown state.

Return -EIO as before but avoid printing the message. Also rename
STAT_ERROR to STATE_BUS_ERROR.

Signed-off-by: Jan Glauber <jglauber@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-octeon-core.c
drivers/i2c/busses/i2c-octeon-core.h