diff options
author | Fam Zheng <famz@redhat.com> | 2017-07-14 10:14:55 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-14 12:04:42 +0200 |
commit | d679ac09f06c53c7cc4ac43bedb068db943272bc (patch) | |
tree | d1e6ad9433d115eb9299db07ae61c360b1a093ae /hw | |
parent | 1b6b7d109ea53157525ad787802e45773fb7becb (diff) | |
download | qemu-d679ac09f06c53c7cc4ac43bedb068db943272bc.zip qemu-d679ac09f06c53c7cc4ac43bedb068db943272bc.tar.gz qemu-d679ac09f06c53c7cc4ac43bedb068db943272bc.tar.bz2 |
virtio-blk: Convert to DEFINE_PROP_LINK
Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <20170714021509.23681-7-famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/virtio-blk.c | 6 | ||||
-rw-r--r-- | hw/s390x/virtio-ccw.c | 2 | ||||
-rw-r--r-- | hw/virtio/virtio-pci.c | 2 |
3 files changed, 2 insertions, 8 deletions
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index c0bd247..b750bd8 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -983,10 +983,6 @@ static void virtio_blk_instance_init(Object *obj) { VirtIOBlock *s = VIRTIO_BLK(obj); - object_property_add_link(obj, "iothread", TYPE_IOTHREAD, - (Object **)&s->conf.iothread, - qdev_prop_allow_set_link_before_realize, - OBJ_PROP_LINK_UNREF_ON_RELEASE, NULL); device_add_bootindex_property(obj, &s->conf.conf.bootindex, "bootindex", "/disk@0,0", DEVICE(obj), NULL); @@ -1014,6 +1010,8 @@ static Property virtio_blk_properties[] = { DEFINE_PROP_BIT("request-merging", VirtIOBlock, conf.request_merging, 0, true), DEFINE_PROP_UINT16("num-queues", VirtIOBlock, conf.num_queues, 1), + DEFINE_PROP_LINK("iothread", VirtIOBlock, conf.iothread, TYPE_IOTHREAD, + IOThread *), DEFINE_PROP_END_OF_LIST(), }; diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index e18fd26..a0437d1 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -867,8 +867,6 @@ static void virtio_ccw_blk_instance_init(Object *obj) virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_BLK); - object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev),"iothread", - &error_abort); object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev), "bootindex", &error_abort); } diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 93480a7..94f72f3 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2000,8 +2000,6 @@ static void virtio_blk_pci_instance_init(Object *obj) virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_BLK); - object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev),"iothread", - &error_abort); object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev), "bootindex", &error_abort); } |