[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-next] misc/pci-testdev: QOM parent field cleanup
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-next] misc/pci-testdev: QOM parent field cleanup |
Date: |
Sun, 30 Jun 2013 14:50:43 +0200 |
Rename to parent_obj and fix any fallout.
Signed-off-by: Andreas Färber <address@hidden>
---
hw/misc/pci-testdev.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
index 153603e..087ec3b 100644
--- a/hw/misc/pci-testdev.c
+++ b/hw/misc/pci-testdev.c
@@ -76,7 +76,10 @@ enum {
#define IOTEST_ACCESS_WIDTH (sizeof(uint8_t))
typedef struct PCITestDevState {
- PCIDevice dev;
+ /*< private >*/
+ PCIDevice parent_obj;
+ /*< public >*/
+
MemoryRegion mmio;
MemoryRegion portio;
IOTest *tests;
@@ -237,7 +240,7 @@ static int pci_testdev_init(PCIDevice *pci_dev)
char *name;
int r, i;
- pci_conf = d->dev.config;
+ pci_conf = pci_dev->config;
pci_conf[PCI_INTERRUPT_PIN] = 0; /* no interrupt pin */
@@ -245,8 +248,8 @@ static int pci_testdev_init(PCIDevice *pci_dev)
"pci-testdev-mmio", IOTEST_MEMSIZE * 2);
memory_region_init_io(&d->portio, &pci_testdev_pio_ops, d,
"pci-testdev-portio", IOTEST_IOSIZE * 2);
- pci_register_bar(&d->dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio);
- pci_register_bar(&d->dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &d->portio);
+ pci_register_bar(pci_dev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio);
+ pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &d->portio);
d->current = -1;
d->tests = g_malloc0(IOTEST_MAX * sizeof *d->tests);
--
1.8.1.4
- [Qemu-devel] [PATCH qom-next] scsi/esp-pci: QOM parent field cleanup, (continued)
- [Qemu-devel] [PATCH v2 08/30] ide/ich: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 09/30] ide/piix: QOM casting sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 10/30] acpi/piix4: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 11/30] misc/pci-testdev: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 12/30] virtio/vmware_vga: QOM casting sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 13/30] misc/ivshmem: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 14/30] xen/xen_platform: QOM casting sweep, peter . crosthwaite, 2013/06/24