diff options
Diffstat (limited to 'hw/char/digic-uart.c')
-rw-r--r-- | hw/char/digic-uart.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/char/digic-uart.c b/hw/char/digic-uart.c index fb4969fc50..c7b3db631d 100644 --- a/hw/char/digic-uart.c +++ b/hw/char/digic-uart.c @@ -79,7 +79,7 @@ static void digic_uart_write(void *opaque, hwaddr addr, uint64_t value, if (s->chr.chr) { /* XXX this blocks entire thread. Rewrite to use * qemu_chr_fe_write and background I/O callbacks */ - qemu_chr_fe_write_all(s->chr.chr, &ch, 1); + qemu_chr_fe_write_all(&s->chr, &ch, 1); } break; @@ -148,7 +148,8 @@ static void digic_uart_realize(DeviceState *dev, Error **errp) DigicUartState *s = DIGIC_UART(dev); if (s->chr.chr) { - qemu_chr_add_handlers(s->chr.chr, uart_can_rx, uart_rx, uart_event, s); + qemu_chr_fe_set_handlers(&s->chr, uart_can_rx, uart_rx, + uart_event, s, NULL); } } |