diff options
Diffstat (limited to 'hw/intc')
-rw-r--r-- | hw/intc/ioapic.c | 4 | ||||
-rw-r--r-- | hw/intc/ioapic_common.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index d866e00297..88428458a0 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -227,10 +227,12 @@ static const MemoryRegionOps ioapic_io_ops = { static void ioapic_init(IOAPICCommonState *s, int instance_no) { + DeviceState *dev = DEVICE(s); + memory_region_init_io(&s->io_memory, OBJECT(s), &ioapic_io_ops, s, "ioapic", 0x1000); - qdev_init_gpio_in(DEVICE(s), ioapic_set_irq, IOAPIC_NUM_PINS); + qdev_init_gpio_in(dev, ioapic_set_irq, IOAPIC_NUM_PINS); ioapics[instance_no] = s; } diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index 9ba1a26092..4611f7fbce 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -109,9 +109,9 @@ static const TypeInfo ioapic_common_type = { .abstract = true, }; -static void register_types(void) +static void ioapic_common_register_types(void) { type_register_static(&ioapic_common_type); } -type_init(register_types) +type_init(ioapic_common_register_types) |