From: KONRAD Frederic <fred.kon...@greensocs.com>

The qdev field is not needed, just drop it.

Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com>
---
 hw/virtio-blk.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c
index 93b9746..65932fd 100644
--- a/hw/virtio-blk.c
+++ b/hw/virtio-blk.c
@@ -33,7 +33,6 @@ typedef struct VirtIOBlock
     BlockConf *conf;
     VirtIOBlkConf blk;
     unsigned short sector_mask;
-    DeviceState *qdev;
 } VirtIOBlock;
 
 typedef struct VirtIOBlockReq
@@ -643,7 +642,6 @@ static int virtio_blk_device_init(VirtIODevice *vdev)
     s->vq = virtio_add_queue(vdev, 128, virtio_blk_handle_output);
 
     qemu_add_vm_change_state_handler(virtio_blk_dma_restart_cb, s);
-    s->qdev = qdev;
     register_savevm(qdev, "virtio-blk", virtio_blk_id++, 2,
                     virtio_blk_save, virtio_blk_load, s);
     bdrv_set_dev_ops(s->bs, &virtio_block_ops, s);
@@ -658,7 +656,7 @@ static int virtio_blk_device_exit(DeviceState *dev)
 {
     VirtIODevice *vdev = VIRTIO_DEVICE(dev);
     VirtIOBlock *s = VIRTIO_BLK(dev);
-    unregister_savevm(s->qdev, "virtio-blk", s);
+    unregister_savevm(dev, "virtio-blk", s);
     blockdev_mark_auto_del(s->bs);
     virtio_common_cleanup(vdev);
     return 0;
-- 
1.7.11.7


Reply via email to