i2c: have I2C receive operation return uint8_t

It is never supposed to fail and cannot return an error, so just
have it return the proper type.  Have it return 0xff on nothing
available, since that's what would happen on a real bus.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Corey Minyard 2018-11-14 11:50:50 -06:00
parent 93198b6cad
commit 2ac4c5f4d2
19 changed files with 37 additions and 44 deletions

View file

@ -249,7 +249,7 @@ static void tmp421_write(TMP421State *s)
}
}
static int tmp421_rx(I2CSlave *i2c)
static uint8_t tmp421_rx(I2CSlave *i2c)
{
TMP421State *s = TMP421(i2c);