Skip to content

Commit

Permalink
virtio-blk: QOM realize preparations
Browse files Browse the repository at this point in the history
Rename variable qdev -> dev since that's what realize's argument is called
by convention.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
afaerber authored and bonzini committed Dec 9, 2013
1 parent 0f3657e commit 179b417
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hw/block/virtio-blk.c
Expand Up @@ -683,8 +683,8 @@ static void virtio_blk_migration_state_changed(Notifier *notifier, void *data)

static int virtio_blk_device_init(VirtIODevice *vdev)
{
DeviceState *qdev = DEVICE(vdev);
VirtIOBlock *s = VIRTIO_BLK(vdev);
DeviceState *dev = DEVICE(vdev);
VirtIOBlock *s = VIRTIO_BLK(dev);
VirtIOBlkConf *blk = &(s->blk);
#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
Error *err = NULL;
Expand Down Expand Up @@ -728,14 +728,14 @@ static int virtio_blk_device_init(VirtIODevice *vdev)
#endif

s->change = qemu_add_vm_change_state_handler(virtio_blk_dma_restart_cb, s);
register_savevm(qdev, "virtio-blk", virtio_blk_id++, 2,
register_savevm(dev, "virtio-blk", virtio_blk_id++, 2,
virtio_blk_save, virtio_blk_load, s);
bdrv_set_dev_ops(s->bs, &virtio_block_ops, s);
bdrv_set_buffer_alignment(s->bs, s->conf->logical_block_size);

bdrv_iostatus_enable(s->bs);

add_boot_device_path(s->conf->bootindex, qdev, "/disk@0,0");
add_boot_device_path(s->conf->bootindex, dev, "/disk@0,0");
return 0;
}

Expand Down

0 comments on commit 179b417

Please sign in to comment.