diff options
author | Corey Minyard | 2018-11-14 18:50:50 +0100 |
---|---|---|
committer | Corey Minyard | 2019-02-28 04:06:08 +0100 |
commit | 2ac4c5f4d2415116d3f417a32311d437791dcfce (patch) | |
tree | 5abf8e22939c5c1c030643ffe2fcdfe7bb16344c /hw/display/sii9022.c | |
parent | i2c: Split smbus into parts (diff) | |
download | qemu-2ac4c5f4d2415116d3f417a32311d437791dcfce.tar.gz qemu-2ac4c5f4d2415116d3f417a32311d437791dcfce.tar.xz qemu-2ac4c5f4d2415116d3f417a32311d437791dcfce.zip |
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/display/sii9022.c')
-rw-r--r-- | hw/display/sii9022.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/sii9022.c b/hw/display/sii9022.c index eaf11a6e7b..9994385c35 100644 --- a/hw/display/sii9022.c +++ b/hw/display/sii9022.c @@ -79,7 +79,7 @@ static int sii9022_event(I2CSlave *i2c, enum i2c_event event) return 0; } -static int sii9022_rx(I2CSlave *i2c) +static uint8_t sii9022_rx(I2CSlave *i2c) { sii9022_state *s = SII9022(i2c); uint8_t res = 0x00; |