diff options
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r-- | hw/core/qdev.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 2e6c29ba78..3f91bff712 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -91,8 +91,7 @@ static void bus_add_child(BusState *bus, DeviceState *child) object_get_typename(OBJECT(child)), (Object **)&kid->child, NULL, /* read-only property */ - 0, /* return ownership on prop deletion */ - NULL); + 0); } void qdev_set_parent_bus(DeviceState *dev, BusState *bus) @@ -481,7 +480,7 @@ void qdev_init_gpio_in_named_with_opaque(DeviceState *dev, gchar *propname = g_strdup_printf("%s[%u]", name, i); object_property_add_child(OBJECT(dev), propname, - OBJECT(gpio_list->in[i]), &error_abort); + OBJECT(gpio_list->in[i])); g_free(propname); } @@ -512,8 +511,7 @@ void qdev_init_gpio_out_named(DeviceState *dev, qemu_irq *pins, object_property_add_link(OBJECT(dev), propname, TYPE_IRQ, (Object **)&pins[i], object_property_allow_set_link, - OBJ_PROP_LINK_STRONG, - &error_abort); + OBJ_PROP_LINK_STRONG); g_free(propname); } gpio_list->num_out += n; @@ -546,8 +544,7 @@ void qdev_connect_gpio_out_named(DeviceState *dev, const char *name, int n, /* We need a name for object_property_set_link to work */ object_property_add_child(container_get(qdev_get_machine(), "/unattached"), - "non-qdev-gpio[*]", OBJECT(pin), - &error_abort); + "non-qdev-gpio[*]", OBJECT(pin)); } object_property_set_link(OBJECT(dev), OBJECT(pin), propname, &error_abort); g_free(propname); @@ -605,8 +602,7 @@ void qdev_pass_gpios(DeviceState *dev, DeviceState *container, char *propname = g_strdup_printf("%s[%d]", nm, i); object_property_add_alias(OBJECT(container), propname, - OBJECT(dev), propname, - &error_abort); + OBJECT(dev), propname); g_free(propname); } for (i = 0; i < ngl->num_out; i++) { @@ -614,8 +610,7 @@ void qdev_pass_gpios(DeviceState *dev, DeviceState *container, char *propname = g_strdup_printf("%s[%d]", nm, i); object_property_add_alias(OBJECT(container), propname, - OBJECT(dev), propname, - &error_abort); + OBJECT(dev), propname); g_free(propname); } QLIST_REMOVE(ngl, node); @@ -756,7 +751,7 @@ static void qdev_class_add_legacy_property(DeviceClass *dc, Property *prop) name = g_strdup_printf("legacy-%s", prop->name); object_class_property_add(OBJECT_CLASS(dc), name, "str", prop->info->print ? qdev_get_legacy_property : prop->info->get, - NULL, NULL, prop, &error_abort); + NULL, NULL, prop); } void qdev_property_add_static(DeviceState *dev, Property *prop) @@ -769,7 +764,7 @@ void qdev_property_add_static(DeviceState *dev, Property *prop) op = object_property_add(obj, prop->name, prop->info->name, prop->info->get, prop->info->set, prop->info->release, - prop, &error_abort); + prop); object_property_set_description(obj, prop->name, prop->info->description); @@ -795,7 +790,7 @@ static void qdev_class_add_property(DeviceClass *klass, Property *prop) prop->name, prop->info->name, prop->info->get, prop->info->set, prop->info->release, - prop, &error_abort); + prop); if (prop->set_default) { prop->info->set_default_value(op, prop); } @@ -818,8 +813,7 @@ void qdev_alias_all_properties(DeviceState *target, Object *source) for (prop = dc->props_; prop && prop->name; prop++) { object_property_add_alias(source, prop->name, - OBJECT(target), prop->name, - &error_abort); + OBJECT(target), prop->name); } class = object_class_get_parent(class); } while (class != object_class_by_name(TYPE_DEVICE)); @@ -871,7 +865,7 @@ static void device_set_realized(Object *obj, bool value, Error **errp) object_property_add_child(container_get(qdev_get_machine(), "/unattached"), - name, obj, &error_abort); + name, obj); unattached_parent = true; g_free(name); } @@ -1198,17 +1192,13 @@ static void device_class_init(ObjectClass *class, void *data) rc->get_transitional_function = device_get_transitional_reset; object_class_property_add_bool(class, "realized", - device_get_realized, device_set_realized, - &error_abort); + device_get_realized, device_set_realized); object_class_property_add_bool(class, "hotpluggable", - device_get_hotpluggable, NULL, - &error_abort); + device_get_hotpluggable, NULL); object_class_property_add_bool(class, "hotplugged", - device_get_hotplugged, NULL, - &error_abort); + device_get_hotplugged, NULL); object_class_property_add_link(class, "parent_bus", TYPE_BUS, - offsetof(DeviceState, parent_bus), NULL, 0, - &error_abort); + offsetof(DeviceState, parent_bus), NULL, 0); } void device_class_set_props(DeviceClass *dc, Property *props) |