diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-25 14:12:36 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 15:53:10 -0600 |
commit | dc7389b79a15082fa4824bd3de966499f3b8cb2a (patch) | |
tree | 0eb0742105b57303d0e6d028a75652db58a048e3 /hw | |
parent | 62d7ba669dbd5b4c92664eea453d28448ab9cb4b (diff) | |
download | qemu-dc7389b79a15082fa4824bd3de966499f3b8cb2a.zip qemu-dc7389b79a15082fa4824bd3de966499f3b8cb2a.tar.gz qemu-dc7389b79a15082fa4824bd3de966499f3b8cb2a.tar.bz2 |
qdev: inline object_delete into qbus_free/qdev_free
We want object_delete to disappear, and we will do this one class at a
time. Inline it for the qdev case, which we will tackle first.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/qdev.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -267,7 +267,8 @@ void qdev_init_nofail(DeviceState *dev) /* Unlink device from bus and free the structure. */ void qdev_free(DeviceState *dev) { - object_delete(OBJECT(dev)); + object_unparent(OBJECT(dev)); + object_unref(OBJECT(dev)); } void qdev_machine_creation_done(void) @@ -472,7 +473,8 @@ BusState *qbus_create(const char *typename, DeviceState *parent, const char *nam void qbus_free(BusState *bus) { - object_delete(OBJECT(bus)); + object_unparent(OBJECT(bus)); + object_unref(OBJECT(bus)); } static char *bus_get_fw_dev_path(BusState *bus, DeviceState *dev) |