aboutsummaryrefslogtreecommitdiff
path: root/hw/core/qdev-properties.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-12-11 17:05:07 -0500
committerEduardo Habkost <ehabkost@redhat.com>2020-12-15 10:02:07 -0500
commit395012756c15ce0a9f73c098d8eebb0fe3c9a7e6 (patch)
tree9ed5f1b42cbb69e8c889bc18701a545ca8feb477 /hw/core/qdev-properties.c
parent828ade86ee925c132496113e7f88b22162d92ec5 (diff)
qdev: Make qdev_find_global_prop() get Object* argument
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201211220529.2290218-11-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 0a54a922c8..41482d83d1 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -818,7 +818,7 @@ void qdev_prop_register_global(GlobalProperty *prop)
g_ptr_array_add(global_props(), prop);
}
-const GlobalProperty *qdev_find_global_prop(DeviceState *dev,
+const GlobalProperty *qdev_find_global_prop(Object *obj,
const char *name)
{
GPtrArray *props = global_props();
@@ -827,7 +827,7 @@ const GlobalProperty *qdev_find_global_prop(DeviceState *dev,
for (i = 0; i < props->len; i++) {
p = g_ptr_array_index(props, i);
- if (object_dynamic_cast(OBJECT(dev), p->driver)
+ if (object_dynamic_cast(obj, p->driver)
&& !strcmp(p->property, name)) {
return p;
}