diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-02-08 11:01:49 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-02-14 21:12:02 +0100 |
commit | 98a6528461acf7a6f321d846e6f4e77e87305965 (patch) | |
tree | b3006cc4fe43afab19981117e495d430bf3590b9 | |
parent | 7ce7ffe02750c73e4dce9fd61d25d0fd0b793a2e (diff) |
qdev: Inline qdev_prop_parse()
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r-- | hw/core/qdev-properties.c | 8 | ||||
-rw-r--r-- | include/hw/qdev-properties.h | 2 | ||||
-rw-r--r-- | qdev-monitor.c | 4 |
3 files changed, 3 insertions, 11 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index a60a1837c7..22ddebf92a 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -933,12 +933,6 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev, } } -void qdev_prop_parse(DeviceState *dev, const char *name, const char *value, - Error **errp) -{ - object_property_parse(OBJECT(dev), value, name, errp); -} - void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value) { object_property_set_bool(OBJECT(dev), value, name, &error_abort); @@ -1031,7 +1025,7 @@ void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename, if (strcmp(typename, prop->driver) != 0) { continue; } - qdev_prop_parse(dev, prop->property, prop->value, &err); + object_property_parse(OBJECT(dev), prop->value, prop->property, &err); if (err != NULL) { error_propagate(errp, err); return; diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 77c6f7c037..4651459af0 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -168,8 +168,6 @@ extern PropertyInfo qdev_prop_arraylen; /* Set properties between creation and init. */ void *qdev_get_prop_ptr(DeviceState *dev, Property *prop); -void qdev_prop_parse(DeviceState *dev, const char *name, const char *value, - Error **errp); void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value); void qdev_prop_set_uint8(DeviceState *dev, const char *name, uint8_t value); void qdev_prop_set_uint16(DeviceState *dev, const char *name, uint16_t value); diff --git a/qdev-monitor.c b/qdev-monitor.c index 1d3b68d40a..4d1634cd5f 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -145,7 +145,7 @@ static void qdev_print_devinfos(bool show_no_user) static int set_property(const char *name, const char *value, void *opaque) { - DeviceState *dev = opaque; + Object *obj = opaque; Error *err = NULL; if (strcmp(name, "driver") == 0) @@ -153,7 +153,7 @@ static int set_property(const char *name, const char *value, void *opaque) if (strcmp(name, "bus") == 0) return 0; - qdev_prop_parse(dev, name, value, &err); + object_property_parse(obj, value, name, &err); if (err != NULL) { qerror_report_err(err); error_free(err); |