aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-02-02 13:08:48 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2012-02-07 13:52:42 +0100
commitdd0ba250ca83ed915ea192ab7539cdbb4e868c14 (patch)
tree6d127f77c7b78b10b9f1e6604ad44428df8f0514 /hw/qdev.c
parent7b009e5d09ee7786a4fd848327b6a8d8d7c01f0d (diff)
qdev: let QOM free properties
Drop the special free callback. Instead, register a "regular" release method in the non-legacy property. Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 0205fe7d7d..487ca5d189 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -595,7 +595,7 @@ void qdev_property_add_static(DeviceState *dev, Property *prop,
object_property_add(OBJECT(dev), prop->name, prop->info->name,
prop->info->get, prop->info->set,
- NULL,
+ prop->info->release,
prop, errp);
}
@@ -626,7 +626,6 @@ static void device_finalize(Object *obj)
{
DeviceState *dev = DEVICE(obj);
BusState *bus;
- Property *prop;
DeviceClass *dc = DEVICE_GET_CLASS(dev);
if (dev->state == DEV_STATE_INITIALIZED) {
@@ -645,11 +644,6 @@ static void device_finalize(Object *obj)
}
}
QTAILQ_REMOVE(&dev->parent_bus->children, dev, sibling);
- for (prop = qdev_get_props(dev); prop && prop->name; prop++) {
- if (prop->info->free) {
- prop->info->free(dev, prop);
- }
- }
}
void device_reset(DeviceState *dev)