aboutsummaryrefslogtreecommitdiff
path: root/hw/char/lm32_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/lm32_uart.c')
-rw-r--r--hw/char/lm32_uart.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/char/lm32_uart.c b/hw/char/lm32_uart.c
index a8d4a2db70..e325b917b3 100644
--- a/hw/char/lm32_uart.c
+++ b/hw/char/lm32_uart.c
@@ -142,7 +142,7 @@ static uint64_t uart_read(void *opaque, hwaddr addr,
r = s->regs[R_RXTX];
s->regs[R_LSR] &= ~LSR_DR;
uart_update_irq(s);
- qemu_chr_fe_accept_input(s->chr.chr);
+ qemu_chr_fe_accept_input(&s->chr);
break;
case R_IIR:
case R_LSR:
@@ -180,7 +180,7 @@ static void uart_write(void *opaque, hwaddr addr,
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;
case R_IER:
@@ -268,7 +268,8 @@ static void lm32_uart_realize(DeviceState *dev, Error **errp)
LM32UartState *s = LM32_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);
}
}