summaryrefslogtreecommitdiff
path: root/hw/scsi/virtio-scsi.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-23 20:30:03 +0200
committerAndreas Färber <afaerber@suse.de>2013-08-30 20:14:39 +0200
commitb1187b51ff5563135da0a9e5c855d7876ab1a926 (patch)
tree81c6a30bfe00e81e35d4532402f1538689232e96 /hw/scsi/virtio-scsi.c
parentdd301ca607feddab3b44f927cd36aee004c40e1a (diff)
downloadqemu-b1187b51ff5563135da0a9e5c855d7876ab1a926.zip
scsi: Pass size to scsi_bus_new()
To be passed to qbus_create_inplace(). Use DEVICE() casts instead of direct parent field access. Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/scsi/virtio-scsi.c')
-rw-r--r--hw/scsi/virtio-scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 05da56bd24..3bd690d128 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -627,7 +627,8 @@ static int virtio_scsi_device_init(VirtIODevice *vdev)
return ret;
}
- scsi_bus_new(&s->bus, qdev, &virtio_scsi_scsi_info, vdev->bus_name);
+ scsi_bus_new(&s->bus, sizeof(s->bus), qdev,
+ &virtio_scsi_scsi_info, vdev->bus_name);
if (!qdev->hotplugged) {
scsi_bus_legacy_handle_cmdline(&s->bus, &err);