[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/32] piix4: rename some variables in realize function
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/32] piix4: rename some variables in realize function |
Date: |
Tue, 15 Oct 2019 18:26:41 +0200 |
From: Hervé Poussineau <address@hidden>
PIIX4 structure is now 's'
PCI device is now 'pci_dev'
DeviceState is now 'dev'
Acked-by: Michael S. Tsirkin <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Hervé Poussineau <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/isa/piix4.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c
index 3294056cd5..4202243e41 100644
--- a/hw/isa/piix4.c
+++ b/hw/isa/piix4.c
@@ -88,16 +88,17 @@ static const VMStateDescription vmstate_piix4 = {
}
};
-static void piix4_realize(PCIDevice *dev, Error **errp)
+static void piix4_realize(PCIDevice *pci_dev, Error **errp)
{
- PIIX4State *d = PIIX4_PCI_DEVICE(dev);
+ DeviceState *dev = DEVICE(pci_dev);
+ PIIX4State *s = DO_UPCAST(PIIX4State, dev, pci_dev);
- 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_dev),
+ pci_address_space_io(pci_dev), errp)) {
return;
}
- piix4_dev = &d->dev;
- qemu_register_reset(piix4_reset, d);
+ piix4_dev = pci_dev;
+ qemu_register_reset(piix4_reset, s);
}
int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)
--
2.21.0
- Re: [PATCH 02/32] hw/i386/pc: Move kvm_i8259_init() declaration to sysemu/kvm.h, (continued)
- [PATCH 03/32] mc146818rtc: move structure to header file, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 04/32] mc146818rtc: Move RTC_ISA_IRQ definition, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 05/32] mc146818rtc: Include "mc146818rtc_regs.h" directly in mc146818rtc.c, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 06/32] mc146818rtc: always register rtc to rtc list, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 07/32] MAINTAINERS: Keep PIIX4 South Bridge separate from PC Chipsets, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 08/32] piix4: rename some variables in realize function,
Philippe Mathieu-Daudé <=
- [PATCH 09/32] piix4: add Reset Control Register, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 10/32] piix4: add a i8259 interrupt controller as specified in datasheet, Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 11/32] Revert "irq: introduce qemu_irq_proxy()", Philippe Mathieu-Daudé, 2019/10/15
- [PATCH 12/32] piix4: rename PIIX4 object to piix4-isa, Philippe Mathieu-Daudé, 2019/10/15