aboutsummaryrefslogtreecommitdiff
path: root/include/hw/char/cmsdk-apb-uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/char/cmsdk-apb-uart.h')
-rw-r--r--include/hw/char/cmsdk-apb-uart.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/char/cmsdk-apb-uart.h b/include/hw/char/cmsdk-apb-uart.h
index 3c1b53db4e..a51471ff74 100644
--- a/include/hw/char/cmsdk-apb-uart.h
+++ b/include/hw/char/cmsdk-apb-uart.h
@@ -62,11 +62,11 @@ static inline DeviceState *cmsdk_apb_uart_create(hwaddr addr,
DeviceState *dev;
SysBusDevice *s;
- dev = qdev_create(NULL, TYPE_CMSDK_APB_UART);
+ dev = qdev_new(TYPE_CMSDK_APB_UART);
s = SYS_BUS_DEVICE(dev);
qdev_prop_set_chr(dev, "chardev", chr);
qdev_prop_set_uint32(dev, "pclk-frq", pclk_frq);
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, NULL, &error_fatal);
sysbus_mmio_map(s, 0, addr);
sysbus_connect_irq(s, 0, txint);
sysbus_connect_irq(s, 1, rxint);