This is required for implementing a container device containing one or more ISA devices to ensure that the refcount is handled correctly.
Signed-off-by: Mark Cave-Ayland <[email protected]> --- include/hw/isa/isa.h | 1 + hw/isa/isa-bus.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 94bff33fcc..a3d54110fd 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -82,6 +82,7 @@ IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); +bool isa_realize(ISADevice *dev, ISABus *bus, Error **errp); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); ISADevice *isa_create_simple(ISABus *bus, const char *name); diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 7e6d2ce5a9..102f4a0e0d 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -172,6 +172,11 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name) return dev; } +bool isa_realize(ISADevice *dev, ISABus *bus, Error **errp) +{ + return qdev_realize(&dev->parent_obj, &bus->parent_obj, errp); +} + bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp) { return qdev_realize_and_unref(&dev->parent_obj, &bus->parent_obj, errp); -- 2.43.0
