diff options
author | Cao jin <caoj.fnst@cn.fujitsu.com> | 2016-04-17 15:45:54 +0800 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2016-06-07 18:19:23 +0300 |
commit | d9d8d452da89678ceed415161313a6c3cd08401c (patch) | |
tree | 9e17ff04575a297b4fe7f4e4e5bdd95fe76f6af1 /hw/core | |
parent | 3b7c78c83af5cb9e93b1ccb54b5cb5375eb438dc (diff) | |
download | qemu-d9d8d452da89678ceed415161313a6c3cd08401c.tar.gz qemu-d9d8d452da89678ceed415161313a6c3cd08401c.tar.bz2 qemu-d9d8d452da89678ceed415161313a6c3cd08401c.zip |
qdev: Clean up around properties
include:
1. remove unnecessary declaration of static function
2. fix inconsistency between comment and function name, and typo OOM->QOM
2. update comments of functions, use uniform format(GTK-Doc style)
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/qdev.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 853162b670..0a05a5295c 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -58,9 +58,6 @@ const char *qdev_fw_name(DeviceState *dev) return object_get_typename(OBJECT(dev)); } -static void qdev_property_add_legacy(DeviceState *dev, Property *prop, - Error **errp); - static void bus_remove_child(BusState *bus, DeviceState *child) { BusChild *kid; @@ -733,13 +730,20 @@ static void qdev_get_legacy_property(Object *obj, Visitor *v, } /** - * @qdev_add_legacy_property - adds a legacy property + * qdev_property_add_legacy: + * @dev: Device to add the property to. + * @prop: The qdev property definition. + * @errp: location to store error information. + * + * Add a legacy QOM property to @dev for qdev property @prop. + * On error, store error in @errp. * - * Do not use this is new code! Properties added through this interface will - * be given names and types in the "legacy" namespace. + * Legacy properties are string versions of QOM properties. The format of + * the string depends on the property type. Legacy properties are only + * needed for "info qtree". * - * Legacy properties are string versions of other OOM properties. The format - * of the string depends on the property type. + * Do not use this is new code! QOM Properties added through this interface + * will be given names in the "legacy" namespace. */ static void qdev_property_add_legacy(DeviceState *dev, Property *prop, Error **errp) @@ -762,10 +766,14 @@ static void qdev_property_add_legacy(DeviceState *dev, Property *prop, } /** - * @qdev_property_add_static - add a @Property to a device. + * qdev_property_add_static: + * @dev: Device to add the property to. + * @prop: The qdev property definition. + * @errp: location to store error information. * - * Static properties access data in a struct. The actual type of the - * property and the field depends on the property type. + * Add a static QOM property to @dev for qdev property @prop. + * On error, store error in @errp. Static properties access data in a struct. + * The type of the QOM property is derived from prop->info. */ void qdev_property_add_static(DeviceState *dev, Property *prop, Error **errp) |