mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -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
|
@ -62,8 +62,6 @@ static void virtio_crypto_initfn(Object *obj)
|
|||
|
||||
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 const TypeInfo virtio_crypto_pci_info = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue