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>
/* 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)
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)