aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-21 18:10:23 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-22 16:46:09 -0400
commit1f14e3889369f190029949b656687df855c0598f (patch)
tree7aa65d25e66fa791af39b073a26d5013d89962e0 /backends
parent07b0db0efbd3b37c5d44e846e74d26b7495637e6 (diff)
cryptodev-backend: Register "chardev" as class property
Class properties make QOM introspection simpler and easier, as they don't require an object to be instantiated. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Message-Id: <20200921221045.699690-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r--backends/cryptodev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/backends/cryptodev.c b/backends/cryptodev.c
index ada4ebe78b..3f141f61ed 100644
--- a/backends/cryptodev.c
+++ b/backends/cryptodev.c
@@ -206,10 +206,6 @@ cryptodev_backend_can_be_deleted(UserCreatable *uc)
static void cryptodev_backend_instance_init(Object *obj)
{
- object_property_add(obj, "queues", "uint32",
- cryptodev_backend_get_queues,
- cryptodev_backend_set_queues,
- NULL, NULL);
/* Initialize devices' queues property to 1 */
object_property_set_int(obj, "queues", 1, NULL);
}
@@ -230,6 +226,10 @@ cryptodev_backend_class_init(ObjectClass *oc, void *data)
ucc->can_be_deleted = cryptodev_backend_can_be_deleted;
QTAILQ_INIT(&crypto_clients);
+ object_class_property_add(oc, "queues", "uint32",
+ cryptodev_backend_get_queues,
+ cryptodev_backend_set_queues,
+ NULL, NULL);
}
static const TypeInfo cryptodev_backend_info = {