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/intel-hda.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/intel-hda.c')
-rw-r--r-- | hw/intel-hda.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/intel-hda.c b/hw/intel-hda.c index f97775c235..675b6591e9 100644 --- a/hw/intel-hda.c +++ b/hw/intel-hda.c @@ -86,7 +86,7 @@ HDACodecDevice *hda_codec_find(HDACodecBus *bus, uint32_t cad) DeviceState *qdev; HDACodecDevice *cdev; - QLIST_FOREACH(qdev, &bus->qbus.children, sibling) { + QTAILQ_FOREACH(qdev, &bus->qbus.children, sibling) { cdev = DO_UPCAST(HDACodecDevice, qdev, qdev); if (cdev->cad == cad) { return cdev; @@ -490,7 +490,7 @@ static void intel_hda_notify_codecs(IntelHDAState *d, uint32_t stream, bool runn DeviceState *qdev; HDACodecDevice *cdev; - QLIST_FOREACH(qdev, &d->codecs.qbus.children, sibling) { + QTAILQ_FOREACH(qdev, &d->codecs.qbus.children, sibling) { cdev = DO_UPCAST(HDACodecDevice, qdev, qdev); if (cdev->info->stream) { cdev->info->stream(cdev, stream, running, output); @@ -1114,7 +1114,7 @@ static void intel_hda_reset(DeviceState *dev) d->wall_base_ns = qemu_get_clock_ns(vm_clock); /* reset codecs */ - QLIST_FOREACH(qdev, &d->codecs.qbus.children, sibling) { + QTAILQ_FOREACH(qdev, &d->codecs.qbus.children, sibling) { cdev = DO_UPCAST(HDACodecDevice, qdev, qdev); if (qdev->info->reset) { qdev->info->reset(qdev); |