aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev-properties.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 737d29c632..e3b2184a60 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1020,12 +1020,11 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value)
*ptr = value;
}
-static QTAILQ_HEAD(, GlobalProperty) global_props =
- QTAILQ_HEAD_INITIALIZER(global_props);
+static GList *global_props;
void qdev_prop_register_global(GlobalProperty *prop)
{
- QTAILQ_INSERT_TAIL(&global_props, prop, next);
+ global_props = g_list_append(global_props, prop);
}
void qdev_prop_register_global_list(GlobalProperty *props)
@@ -1039,10 +1038,11 @@ void qdev_prop_register_global_list(GlobalProperty *props)
int qdev_prop_check_globals(void)
{
- GlobalProperty *prop;
+ GList *l;
int ret = 0;
- QTAILQ_FOREACH(prop, &global_props, next) {
+ for (l = global_props; l; l = l->next) {
+ GlobalProperty *prop = l->data;
ObjectClass *oc;
DeviceClass *dc;
if (prop->used) {
@@ -1073,9 +1073,10 @@ int qdev_prop_check_globals(void)
static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
- GlobalProperty *prop;
+ GList *l;
- QTAILQ_FOREACH(prop, &global_props, next) {
+ for (l = global_props; l; l = l->next) {
+ GlobalProperty *prop = l->data;
Error *err = NULL;
if (strcmp(typename, prop->driver) != 0) {