diff mbox series

[v2,05/15] piix4: rename some variables in realize function

Message ID 20171216213004.30393-6-hpoussin@reactos.org
State New
Headers show
Series piix4: cleanup and improvements | expand

Commit Message

Hervé Poussineau Dec. 16, 2017, 9:29 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 6b8bc3faf0..4f476dc7e6 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -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)