diff options
author | Andreas Färber | 2013-07-30 05:41:42 +0200 |
---|---|---|
committer | Paolo Bonzini | 2013-12-09 21:46:49 +0100 |
commit | 7598f0f30e027146ba70517a2bda98d16bac1e24 (patch) | |
tree | 39bc8675cb93662640c3fa8e4e667d7d8f524922 /hw/scsi/virtio-scsi.c | |
parent | virtio-rng: QOM realize preparations (diff) | |
download | qemu-7598f0f30e027146ba70517a2bda98d16bac1e24.tar.gz qemu-7598f0f30e027146ba70517a2bda98d16bac1e24.tar.xz qemu-7598f0f30e027146ba70517a2bda98d16bac1e24.zip |
virtio-scsi: QOM realize preparations
Rename qdev -> dev since that's what realize's argument is called by
convention. No need to keep more "qdev" around than necessary.
Avoid duplicate VIRTIO_DEVICE() cast.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/virtio-scsi.c')
-rw-r--r-- | hw/scsi/virtio-scsi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 83344eacc0..a5b957d3c3 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -594,7 +594,7 @@ int virtio_scsi_common_init(VirtIOSCSICommon *s) VirtIODevice *vdev = VIRTIO_DEVICE(s); int i; - virtio_init(VIRTIO_DEVICE(s), "virtio-scsi", VIRTIO_ID_SCSI, + virtio_init(vdev, "virtio-scsi", VIRTIO_ID_SCSI, sizeof(VirtIOSCSIConfig)); s->cmd_vqs = g_malloc0(s->conf.num_queues * sizeof(VirtQueue *)); @@ -615,9 +615,9 @@ int virtio_scsi_common_init(VirtIOSCSICommon *s) static int virtio_scsi_device_init(VirtIODevice *vdev) { - DeviceState *qdev = DEVICE(vdev); - VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev); - VirtIOSCSI *s = VIRTIO_SCSI(vdev); + DeviceState *dev = DEVICE(vdev); + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(dev); + VirtIOSCSI *s = VIRTIO_SCSI(dev); static int virtio_scsi_id; Error *err = NULL; int ret; @@ -627,10 +627,10 @@ static int virtio_scsi_device_init(VirtIODevice *vdev) return ret; } - scsi_bus_new(&s->bus, sizeof(s->bus), qdev, + scsi_bus_new(&s->bus, sizeof(s->bus), dev, &virtio_scsi_scsi_info, vdev->bus_name); - if (!qdev->hotplugged) { + if (!dev->hotplugged) { scsi_bus_legacy_handle_cmdline(&s->bus, &err); if (err != NULL) { error_free(err); @@ -638,7 +638,7 @@ static int virtio_scsi_device_init(VirtIODevice *vdev) } } - register_savevm(qdev, "virtio-scsi", virtio_scsi_id++, 1, + register_savevm(dev, "virtio-scsi", virtio_scsi_id++, 1, virtio_scsi_save, virtio_scsi_load, s); return 0; |