mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
isa: QOM'ify ISABus
Rename its parent field and use ISA_BUS() where necessary. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
d2628b7d18
commit
2ae0e48d5f
7 changed files with 13 additions and 11 deletions
|
@ -55,7 +55,7 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space_io)
|
|||
qdev_init_nofail(dev);
|
||||
}
|
||||
|
||||
isabus = FROM_QBUS(ISABus, qbus_create(TYPE_ISA_BUS, dev, NULL));
|
||||
isabus = ISA_BUS(qbus_create(TYPE_ISA_BUS, dev, NULL));
|
||||
isabus->address_space_io = address_space_io;
|
||||
return isabus;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs)
|
|||
*/
|
||||
qemu_irq isa_get_irq(ISADevice *dev, int isairq)
|
||||
{
|
||||
assert(!dev || DO_UPCAST(ISABus, qbus, dev->qdev.parent_bus) == isabus);
|
||||
assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
|
||||
if (isairq < 0 || isairq > 15) {
|
||||
hw_error("isa irq %d invalid", isairq);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ ISADevice *isa_create(ISABus *bus, const char *name)
|
|||
hw_error("Tried to create isa device %s with no isa bus present.",
|
||||
name);
|
||||
}
|
||||
dev = qdev_create(&bus->qbus, name);
|
||||
dev = qdev_create(BUS(bus), name);
|
||||
return ISA_DEVICE(dev);
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ ISADevice *isa_try_create(ISABus *bus, const char *name)
|
|||
hw_error("Tried to create isa device %s with no isa bus present.",
|
||||
name);
|
||||
}
|
||||
dev = qdev_try_create(&bus->qbus, name);
|
||||
dev = qdev_try_create(BUS(bus), name);
|
||||
return ISA_DEVICE(dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue