@@ -87,16 +87,17 @@ static const VMStateDescription vmstate_piix4 = {
}
};
-static void piix4_realize(PCIDevice *dev, Error **errp)
+static void piix4_realize(PCIDevice *pci, Error **errp)
{
- PIIX4State *d = PIIX4_PCI_DEVICE(dev);
+ DeviceState *dev = DEVICE(pci);
+ PIIX4State *s = DO_UPCAST(PIIX4State, dev, pci);
- if (!isa_bus_new(DEVICE(d), pci_address_space(dev),
- pci_address_space_io(dev), errp)) {
+ if (!isa_bus_new(dev, pci_address_space(pci),
+ pci_address_space_io(pci), errp)) {
return;
}
- piix4_dev = &d->dev;
- qemu_register_reset(piix4_reset, d);
+ piix4_dev = pci;
+ qemu_register_reset(piix4_reset, s);
}
int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
PIIX4 structure is now 's' PCI device is now 'pci' DeviceState is now 'dev' Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> --- hw/isa/piix4.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)