diff options
Diffstat (limited to 'hw/sparc64/sun4u.c')
-rw-r--r-- | hw/sparc64/sun4u.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 0b898d6e3d..8470c33f99 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -300,6 +300,7 @@ static void ebus_isa_irq_handler(void *opaque, int n, int level) static void ebus_realize(PCIDevice *pci_dev, Error **errp) { EbusState *s = EBUS(pci_dev); + ISADevice *isa_dev; SysBusDevice *sbd; DeviceState *dev; qemu_irq *isa_irq; @@ -338,7 +339,8 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) for (i = 0; i < MAX_FD; i++) { fd[i] = drive_get(IF_FLOPPY, 0, i); } - dev = DEVICE(isa_create(s->isa_bus, TYPE_ISA_FDC)); + isa_dev = isa_new(TYPE_ISA_FDC); + dev = DEVICE(isa_dev); if (fd[0]) { qdev_prop_set_drive(dev, "driveA", blk_by_legacy_dinfo(fd[0]), &error_abort); @@ -348,7 +350,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) &error_abort); } qdev_prop_set_uint32(dev, "dma", -1); - qdev_init_nofail(dev); + isa_realize_and_unref(isa_dev, s->isa_bus, &error_fatal); /* Power */ dev = qdev_new(TYPE_SUN4U_POWER); |