aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-properties.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-04-02 22:40:26 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-18 15:14:38 +0200
commitfdae245f56f97387bb33b2db03aa015f206c24b2 (patch)
treea36e8fca803c47266d8a325803974b6468fe9202 /hw/qdev-properties.c
parent4b3582b06b6105ac182a051e4f3647da2c99fd66 (diff)
qdev: Remove qdev_prop_set_defaults
Instead, qdev_property_add_static can set the default. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/qdev-properties.c')
-rw-r--r--hw/qdev-properties.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 04e8326108..f4b9a0e2c8 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -1106,28 +1106,6 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value)
*ptr = value;
}
-void qdev_prop_set_defaults(DeviceState *dev, Property *props)
-{
- Object *obj = OBJECT(dev);
- if (!props)
- return;
- for (; props->name; props++) {
- Error *errp = NULL;
- if (props->qtype == QTYPE_NONE) {
- continue;
- }
- if (props->qtype == QTYPE_QBOOL) {
- object_property_set_bool(obj, props->defval, props->name, &errp);
- } else if (props->info->enum_table) {
- object_property_set_str(obj, props->info->enum_table[props->defval],
- props->name, &errp);
- } else if (props->qtype == QTYPE_QINT) {
- object_property_set_int(obj, props->defval, props->name, &errp);
- }
- assert_no_error(errp);
- }
-}
-
static QTAILQ_HEAD(, GlobalProperty) global_props = QTAILQ_HEAD_INITIALIZER(global_props);
static void qdev_prop_register_global(GlobalProperty *prop)