aboutsummaryrefslogtreecommitdiff
path: root/hw/dma/rc4030.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/dma/rc4030.c')
-rw-r--r--hw/dma/rc4030.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c
index eefbabd758..21c9706bf3 100644
--- a/hw/dma/rc4030.c
+++ b/hw/dma/rc4030.c
@@ -28,6 +28,7 @@
#include "hw/mips/mips.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
+#include "qapi/error.h"
#include "qemu/timer.h"
#include "qemu/log.h"
#include "qemu/module.h"
@@ -744,8 +745,8 @@ DeviceState *rc4030_init(rc4030_dma **dmas, IOMMUMemoryRegion **dma_mr)
{
DeviceState *dev;
- dev = qdev_create(NULL, TYPE_RC4030);
- qdev_init_nofail(dev);
+ dev = qdev_new(TYPE_RC4030);
+ qdev_realize_and_unref(dev, NULL, &error_fatal);
*dmas = rc4030_allocate_dmas(dev, 4);
*dma_mr = &RC4030(dev)->dma_mr;