aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-09-14 09:28:06 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-28 19:25:51 +0200
commitd8bb00d6d72eba317f78501434fc37db4968fa31 (patch)
treeff256818d8ffb51d20ba626db9a5f20f6e411c1f /hw/ssi.c
parentafd4030c16d290e460cc93f8f9e353516b5451a2 (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/ssi.c')
-rw-r--r--hw/ssi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ssi.c b/hw/ssi.c
index 3f4c5f9f06..9842fe7472 100644
--- a/hw/ssi.c
+++ b/hw/ssi.c
@@ -25,8 +25,8 @@ static int ssi_slave_init(DeviceState *dev, DeviceInfo *base_info)
SSIBus *bus;
bus = FROM_QBUS(SSIBus, qdev_get_parent_bus(dev));
- if (QLIST_FIRST(&bus->qbus.children) != dev
- || QLIST_NEXT(dev, sibling) != NULL) {
+ if (QTAILQ_FIRST(&bus->qbus.children) != dev
+ || QTAILQ_NEXT(dev, sibling) != NULL) {
hw_error("Too many devices on SSI bus");
}
@@ -61,7 +61,7 @@ uint32_t ssi_transfer(SSIBus *bus, uint32_t val)
{
DeviceState *dev;
SSISlave *slave;
- dev = QLIST_FIRST(&bus->qbus.children);
+ dev = QTAILQ_FIRST(&bus->qbus.children);
if (!dev) {
return 0;
}