diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-12-04 18:20:07 +0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2018-12-11 15:45:22 -0200 |
commit | 3650b2de3418daf38960a1d87f6ce1f1bf80183c (patch) | |
tree | 0c1ab4967bfd17df8ce7e50f8e4dabab7a89a533 /hw/virtio/virtio-rng.c | |
parent | aa1b35b975d83a1ee3b5d1a1ae200a59ca44f8d2 (diff) |
qom: make user_creatable_complete() specific to UserCreatable
Instead of accepting any Object*, change user_creatable_complete() to
require a UserCreatable*. Modify the callers to pass the appropriate
argument, removing redundant dynamic cast checks in object creation.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20181204142023.15982-4-marcandre.lureau@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/virtio/virtio-rng.c')
-rw-r--r-- | hw/virtio/virtio-rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 855f1b41d1..30493a2586 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -191,7 +191,7 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp) if (vrng->conf.rng == NULL) { vrng->conf.default_backend = RNG_RANDOM(object_new(TYPE_RNG_RANDOM)); - user_creatable_complete(OBJECT(vrng->conf.default_backend), + user_creatable_complete(USER_CREATABLE(vrng->conf.default_backend), &local_err); if (local_err) { error_propagate(errp, local_err); |