diff options
-rw-r--r-- | hw/core/qdev.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 7c1b7325ca..482a9780d1 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -590,7 +590,7 @@ static void qdev_get_legacy_property(Object *obj, Visitor *v, void *opaque, void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp) { - gchar *name, *type; + gchar *name; /* Register pointer properties as legacy properties */ if (!prop->info->print && prop->info->get) { @@ -598,16 +598,12 @@ void qdev_property_add_legacy(DeviceState *dev, Property *prop, } name = g_strdup_printf("legacy-%s", prop->name); - type = g_strdup_printf("legacy<%s>", - prop->info->legacy_name ?: prop->info->name); - - object_property_add(OBJECT(dev), name, type, + object_property_add(OBJECT(dev), name, "str", prop->info->print ? qdev_get_legacy_property : prop->info->get, NULL, NULL, prop, errp); - g_free(type); g_free(name); } |