aboutsummaryrefslogtreecommitdiffstats
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2010-05-10 18:37:10 -0700
committerDavid 'Digit' Turner <digit@android.com>2010-05-10 23:26:57 -0700
commita5d412078b8e7478d81df03710eacc7a21096ba2 (patch)
tree7b6fb338233657c9885bd94f08dee3aa2973c98f /hw/qdev.c
parent20894ae3fa98f82da925fbeb72e616eef509758a (diff)
downloadexternal_qemu-a5d412078b8e7478d81df03710eacc7a21096ba2.zip
external_qemu-a5d412078b8e7478d81df03710eacc7a21096ba2.tar.gz
external_qemu-a5d412078b8e7478d81df03710eacc7a21096ba2.tar.bz2
Upstream: Replace sys-queue.h with qemu-queue.h
Change-Id: I5c51f54a7fe2ea702420429bbf0c789ed6d8c534
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 385e709..1c8b981 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -98,7 +98,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
t->info->bus_type, bus->type);
}
dev->parent_bus = bus;
- LIST_INSERT_HEAD(&bus->children, dev, sibling);
+ QLIST_INSERT_HEAD(&bus->children, dev, sibling);
return dev;
}
@@ -113,8 +113,8 @@ void qdev_init(DeviceState *dev)
/* Unlink device from bus and free the structure. */
void qdev_free(DeviceState *dev)
{
- LIST_REMOVE(dev, sibling);
- free(dev);
+ QLIST_REMOVE(dev, sibling);
+ qemu_free(dev);
}
static DeviceProperty *create_prop(DeviceState *dev, const char *name,
@@ -293,7 +293,7 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name)
{
BusState *bus;
- LIST_FOREACH(bus, &dev->child_bus, sibling) {
+ QLIST_FOREACH(bus, &dev->child_bus, sibling) {
if (strcmp(name, bus->name) == 0) {
return bus;
}
@@ -329,9 +329,9 @@ BusState *qbus_create(BusType type, size_t size,
bus->type = type;
bus->parent = parent;
bus->name = qemu_strdup(name);
- LIST_INIT(&bus->children);
+ QLIST_INIT(&bus->children);
if (parent) {
- LIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
+ QLIST_INSERT_HEAD(&parent->child_bus, bus, sibling);
}
return bus;
}
@@ -384,7 +384,7 @@ static void qdev_print(Monitor *mon, DeviceState *dev, int indent)
default:
break;
}
- LIST_FOREACH(child, &dev->child_bus, sibling) {
+ QLIST_FOREACH(child, &dev->child_bus, sibling) {
qbus_print(mon, child, indent);
}
}
@@ -396,7 +396,7 @@ static void qbus_print(Monitor *mon, BusState *bus, int indent)
qdev_printf("bus: %s\n", bus->name);
indent += 2;
qdev_printf("type %s\n", bus_type_names[bus->type]);
- LIST_FOREACH(dev, &bus->children, sibling) {
+ QLIST_FOREACH(dev, &bus->children, sibling) {
qdev_print(mon, dev, indent);
}
}