mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
virtio-crypto: Convert to DEFINE_PROP_LINK
Unlike other object_property_add_link() occurrences in virtio devices, virtio-crypto checks the "in use" state of the linked backend object in addition to qdev_prop_allow_set_link_before_realize. To convert it without needing to specialize DEFINE_PROP_LINK which always uses the qdev callback, move the "in use" check to device realize time. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170714021509.23681-10-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d1fd7f775e
commit
aa8f057e74
3 changed files with 7 additions and 25 deletions
|
@ -1594,9 +1594,6 @@ static void virtio_ccw_crypto_instance_init(Object *obj)
|
|||
ccw_dev->force_revision_1 = true;
|
||||
virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),
|
||||
TYPE_VIRTIO_CRYPTO);
|
||||
|
||||
object_property_add_alias(obj, "cryptodev", OBJECT(&dev->vdev),
|
||||
"cryptodev", &error_abort);
|
||||
}
|
||||
|
||||
static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue