diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-14 09:28:06 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-10-28 19:25:51 +0200 |
commit | d8bb00d6d72eba317f78501434fc37db4968fa31 (patch) | |
tree | ff256818d8ffb51d20ba626db9a5f20f6e411c1f /hw/acpi_piix4.c | |
parent | afd4030c16d290e460cc93f8f9e353516b5451a2 (diff) |
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. This
requires using a QTAILQ, because hell breaks loose if you just try
inserting at the tail (thus reversing the order of all existing
visits from last-to-first to first-to-tail).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/acpi_piix4.c')
-rw-r--r-- | hw/acpi_piix4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 29f0f76c35..d9075e6611 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -276,7 +276,7 @@ static void piix4_update_hotplug(PIIX4PMState *s) s->pci0_hotplug_enable = ~0; - QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) { + QTAILQ_FOREACH_SAFE(qdev, &bus->children, sibling, next) { PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev); PCIDevice *pdev = DO_UPCAST(PCIDevice, qdev, qdev); int slot = PCI_SLOT(pdev->devfn); @@ -486,7 +486,7 @@ static void pciej_write(void *opaque, uint32_t addr, uint32_t val) PCIDeviceInfo *info; int slot = ffs(val) - 1; - QLIST_FOREACH_SAFE(qdev, &bus->children, sibling, next) { + QTAILQ_FOREACH_SAFE(qdev, &bus->children, sibling, next) { dev = DO_UPCAST(PCIDevice, qdev, qdev); info = container_of(qdev->info, PCIDeviceInfo, qdev); if (PCI_SLOT(dev->devfn) == slot && !info->no_hotplug) { |