From 30fbb9fc7cd73abc32ff71ceb59e9a3be37ac128 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Sun, 4 Dec 2011 11:08:36 -0600 Subject: qdev: move qdev->info to class Right now, DeviceInfo acts as the class for qdev. In order to switch to a proper ObjectClass derivative, we need to ween all of the callers off of interacting directly with the info pointer. Signed-off-by: Anthony Liguori --- hw/acpi_piix4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/acpi_piix4.c') diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index bdc55a1..4d0b390 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -280,7 +280,7 @@ static void piix4_update_hotplug(PIIX4PMState *s) s->pci0_hotplug_enable = ~0; QTAILQ_FOREACH_SAFE(qdev, &bus->children, sibling, next) { - PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev); + PCIDeviceInfo *info = container_of(qdev_get_info(qdev), PCIDeviceInfo, qdev); PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev); int slot = PCI_SLOT(pdev->devfn); @@ -491,7 +491,7 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val) QTAILQ_FOREACH_SAFE(qdev, &bus->children, sibling, next) { dev = DO_UPCAST(PCIDevice, qdev, qdev); - info = container_of(qdev->info, PCIDeviceInfo, qdev); + info = container_of(qdev_get_info(qdev), PCIDeviceInfo, qdev); if (PCI_SLOT(dev->devfn) == slot && !info->no_hotplug) { qdev_free(qdev); } -- cgit v1.1