aboutsummaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:31:57 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 21:36:30 +0200
commitdc3edf8d8a544dbf21e1cb63339e42806470d5d9 (patch)
tree23484389b69a38a45e6976b1e90ba9fcba22cf32 /hw/core
parent981c3dcd948907f1127bc1d85b6e455dce687096 (diff)
qdev: Convert to qdev_unrealize() manually
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-9-armbru@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/qdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index b7355fbcd0..4768244f31 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -421,7 +421,7 @@ static void device_reset_child_foreach(Object *obj, ResettableChildCallback cb,
void qdev_simple_device_unplug_cb(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
- object_property_set_bool(OBJECT(dev), false, "realized", &error_abort);
+ qdev_unrealize(dev);
}
/*
@@ -1183,7 +1183,7 @@ static void device_unparent(Object *obj)
BusState *bus;
if (dev->realized) {
- object_property_set_bool(obj, false, "realized", &error_abort);
+ qdev_unrealize(dev);
}
while (dev->num_child_bus) {
bus = QLIST_FIRST(&dev->child_bus);