X-Git-Url: https://repo.jachan.dev/qemu.git/blobdiff_plain/0bbac62618356794097b99a9b8b7634357170b03..947231ad3b479de82d8f5ec185e2d00f3c96edcd:/hw/intc/i8259_common.c diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index fbf26e5576..c2fd563b5b 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -22,6 +22,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#include "qemu/osdep.h" #include "hw/i386/pc.h" #include "hw/isa/i8259_internal.h" @@ -69,10 +70,11 @@ static int pic_dispatch_post_load(void *opaque, int version_id) static void pic_common_realize(DeviceState *dev, Error **errp) { PICCommonState *s = PIC_COMMON(dev); + ISADevice *isa = ISA_DEVICE(dev); - isa_register_ioport(NULL, &s->base_io, s->iobase); + isa_register_ioport(isa, &s->base_io, s->iobase); if (s->elcr_addr != -1) { - isa_register_ioport(NULL, &s->elcr_io, s->elcr_addr); + isa_register_ioport(isa, &s->elcr_io, s->elcr_addr); } qdev_set_legacy_instance_id(dev, s->iobase, 1); @@ -142,7 +144,7 @@ static void pic_common_class_init(ObjectClass *klass, void *data) * wiring of the slave to the master is hard-coded in device model * code. */ - dc->cannot_instantiate_with_device_add_yet = true; + dc->user_creatable = false; } static const TypeInfo pic_common_type = {