aboutsummaryrefslogtreecommitdiff
path: root/hw/char/exynos4210_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/exynos4210_uart.c')
-rw-r--r--hw/char/exynos4210_uart.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c
index 96d5180e3e..b86bd7b2e6 100644
--- a/hw/char/exynos4210_uart.c
+++ b/hw/char/exynos4210_uart.c
@@ -22,6 +22,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
+#include "qapi/error.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/timer.h"
@@ -652,7 +653,7 @@ DeviceState *exynos4210_uart_create(hwaddr addr,
DeviceState *dev;
SysBusDevice *bus;
- dev = qdev_create(NULL, TYPE_EXYNOS4210_UART);
+ dev = qdev_new(TYPE_EXYNOS4210_UART);
qdev_prop_set_chr(dev, "chardev", chr);
qdev_prop_set_uint32(dev, "channel", channel);
@@ -660,7 +661,7 @@ DeviceState *exynos4210_uart_create(hwaddr addr,
qdev_prop_set_uint32(dev, "tx-size", fifo_size);
bus = SYS_BUS_DEVICE(dev);
- qdev_init_nofail(dev);
+ qdev_realize_and_unref(dev, NULL, &error_fatal);
if (addr != (hwaddr)-1) {
sysbus_mmio_map(bus, 0, addr);
}