summary refs log tree commit diff stats
path: root/hw/core/qdev-properties.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-12-11 17:05:18 -0500
committerEduardo Habkost <ehabkost@redhat.com>2020-12-18 15:20:17 -0500
commitc80fab0b61ee7d801caa4d04c3d014e76cd836c8 (patch)
treebbce95cce49e0f207f0b029100555a7f3047755a /hw/core/qdev-properties.c
parent23a1dae8c16e7e9e728dc8ae2daaece974bd7d01 (diff)
downloadfocaccia-qemu-c80fab0b61ee7d801caa4d04c3d014e76cd836c8.tar.gz
focaccia-qemu-c80fab0b61ee7d801caa4d04c3d014e76cd836c8.zip
qdev: Add name argument to PropertyInfo.create method
This will make it easier to remove the Property.name field in the
future.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20201211220529.2290218-22-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core/qdev-properties.c')
-rw-r--r--hw/core/qdev-properties.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 457c7fe4ba..c68a20695d 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -851,9 +851,10 @@ const PropertyInfo qdev_prop_size = {
 
 /* --- object link property --- */
 
-static void create_link_property(ObjectClass *oc, Property *prop)
+static void create_link_property(ObjectClass *oc, const char *name,
+                                 Property *prop)
 {
-    object_class_property_add_link(oc, prop->name, prop->link_type,
+    object_class_property_add_link(oc, name, prop->link_type,
                                    prop->offset,
                                    qdev_prop_allow_set_link_before_realize,
                                    OBJ_PROP_LINK_STRONG);
@@ -893,7 +894,7 @@ static void qdev_class_add_property(DeviceClass *klass, const char *name,
     ObjectClass *oc = OBJECT_CLASS(klass);
 
     if (prop->info->create) {
-        prop->info->create(oc, prop);
+        prop->info->create(oc, name, prop);
     } else {
         ObjectProperty *op;