diff options
author | Corey Minyard <cminyard@mvista.com> | 2018-11-14 11:50:50 -0600 |
---|---|---|
committer | Corey Minyard <cminyard@mvista.com> | 2019-02-27 21:06:08 -0600 |
commit | 2ac4c5f4d2415116d3f417a32311d437791dcfce (patch) | |
tree | 5abf8e22939c5c1c030643ffe2fcdfe7bb16344c /hw/gpio | |
parent | 93198b6cad8af03996373584284a1673ad6000cb (diff) |
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>
Diffstat (limited to 'hw/gpio')
-rw-r--r-- | hw/gpio/max7310.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c index 1a2478b5a9..c6f686c3eb 100644 --- a/hw/gpio/max7310.c +++ b/hw/gpio/max7310.c @@ -39,7 +39,7 @@ static void max7310_reset(DeviceState *dev) s->command = 0x00; } -static int max7310_rx(I2CSlave *i2c) +static uint8_t max7310_rx(I2CSlave *i2c) { MAX7310State *s = MAX7310(i2c); |