summaryrefslogtreecommitdiffstats
path: root/hw/9pfs/virtio-9p-device.c
diff options
context:
space:
mode:
authorGreg Kurz2018-02-01 21:21:27 +0100
committerGreg Kurz2018-02-01 21:21:27 +0100
commit066eb006b54308be60fc2a435a04cde8f4187502 (patch)
tree1d418ceb42b7a88275ee2345a39710f81c4a5bd6 /hw/9pfs/virtio-9p-device.c
parentMerge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180131' into staging (diff)
downloadqemu-066eb006b54308be60fc2a435a04cde8f4187502.tar.gz
qemu-066eb006b54308be60fc2a435a04cde8f4187502.tar.xz
qemu-066eb006b54308be60fc2a435a04cde8f4187502.zip
9pfs: drop v9fs_register_transport()
No good reasons to do this outside of v9fs_device_realize_common(). Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/9pfs/virtio-9p-device.c')
-rw-r--r--hw/9pfs/virtio-9p-device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 43f4e53f33..775e8ff766 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -198,17 +198,13 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
V9fsVirtioState *v = VIRTIO_9P(dev);
V9fsState *s = &v->state;
- if (v9fs_device_realize_common(s, errp)) {
- goto out;
+ if (v9fs_device_realize_common(s, &virtio_9p_transport, errp)) {
+ return;
}
v->config_size = sizeof(struct virtio_9p_config) + strlen(s->fsconf.tag);
virtio_init(vdev, "virtio-9p", VIRTIO_ID_9P, v->config_size);
v->vq = virtio_add_queue(vdev, MAX_REQ, handle_9p_output);
- v9fs_register_transport(s, &virtio_9p_transport);
-
-out:
- return;
}
static void virtio_9p_device_unrealize(DeviceState *dev, Error **errp)