summaryrefslogtreecommitdiffstats
path: root/hw/arm/tosa.c
diff options
context:
space:
mode:
authorCorey Minyard2018-11-14 18:50:50 +0100
committerCorey Minyard2019-02-28 04:06:08 +0100
commit2ac4c5f4d2415116d3f417a32311d437791dcfce (patch)
tree5abf8e22939c5c1c030643ffe2fcdfe7bb16344c /hw/arm/tosa.c
parenti2c: Split smbus into parts (diff)
downloadqemu-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/arm/tosa.c')
-rw-r--r--hw/arm/tosa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c
index 7a925fa5e6..eef9d427e7 100644
--- a/hw/arm/tosa.c
+++ b/hw/arm/tosa.c
@@ -197,10 +197,10 @@ static int tosa_dac_event(I2CSlave *i2c, enum i2c_event event)
return 0;
}
-static int tosa_dac_recv(I2CSlave *s)
+static uint8_t tosa_dac_recv(I2CSlave *s)
{
printf("%s: recv not supported!!!\n", __func__);
- return -1;
+ return 0xff;
}
static void tosa_tg_init(PXA2xxState *cpu)