]> git.ipfire.org Git - thirdparty/qemu.git/commit - hw/virtio/virtio-crypto.c
virtio-crypto: Convert to DEFINE_PROP_LINK
authorFam Zheng <famz@redhat.com>
Fri, 14 Jul 2017 02:14:58 +0000 (10:14 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jul 2017 10:04:43 +0000 (12:04 +0200)
commitaa8f057e74ae08014736a690ff41f76c756f75f1
tree4e1b9b0b0cdbafe3fdb6324ff3dbb1da955f2d8c
parentd1fd7f775ea975f7c710c380a1967e1576dec48f
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>
hw/s390x/virtio-ccw.c
hw/virtio/virtio-crypto-pci.c
hw/virtio/virtio-crypto.c