[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/11] cryptodev-backend: Register "chardev" as class property
From: |
Eduardo Habkost |
Subject: |
[PULL 04/11] cryptodev-backend: Register "chardev" as class property |
Date: |
Tue, 22 Sep 2020 18:25:35 -0400 |
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>
---
backends/cryptodev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/backends/cryptodev.c b/backends/cryptodev.c
index ada4ebe78b1..3f141f61ed6 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 = {
--
2.26.2
- [PULL 00/11] machine + QOM queue, 2020-09-22, Eduardo Habkost, 2020/09/22
- [PULL 04/11] cryptodev-backend: Register "chardev" as class property,
Eduardo Habkost <=
- [PULL 02/11] smp: drop support for deprecated (invalid topologies), Eduardo Habkost, 2020/09/22
- [PULL 03/11] cryptodev-vhost-user: Register "chardev" as class property, Eduardo Habkost, 2020/09/22
- [PULL 01/11] qom: simplify object_find_property / object_class_find_property, Eduardo Habkost, 2020/09/22
- [PULL 05/11] s390x: Register all CPU properties as class properties, Eduardo Habkost, 2020/09/22
- [PULL 07/11] xlnx-zcu102: Register properties as class properties, Eduardo Habkost, 2020/09/22
- [PULL 06/11] cpu/core: Register core-id and nr-threads as class properties, Eduardo Habkost, 2020/09/22
- [PULL 08/11] machine: Register "memory-backend" as class property, Eduardo Habkost, 2020/09/22
- [PULL 09/11] i440fx: Register i440FX-pcihost properties as class properties, Eduardo Habkost, 2020/09/22
- [PULL 10/11] sifive_e: Register "revb" as class property, Eduardo Habkost, 2020/09/22
- [PULL 11/11] sifive_u: Register "start-in-flash" as class property, Eduardo Habkost, 2020/09/22