From d8bb00d6d72eba317f78501434fc37db4968fa31 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 14 Sep 2011 09:28:06 +0200 Subject: 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 Signed-off-by: Kevin Wolf --- hw/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/i2c.c') diff --git a/hw/i2c.c b/hw/i2c.c index 49b9ecb..9bcf3e1 100644 --- a/hw/i2c.c +++ b/hw/i2c.c @@ -84,7 +84,7 @@ int i2c_start_transfer(i2c_bus *bus, uint8_t address, int recv) DeviceState *qdev; i2c_slave *slave = NULL; - QLIST_FOREACH(qdev, &bus->qbus.children, sibling) { + QTAILQ_FOREACH(qdev, &bus->qbus.children, sibling) { i2c_slave *candidate = I2C_SLAVE_FROM_QDEV(qdev); if (candidate->address == address) { slave = candidate; -- cgit v1.1