From: KONRAD Frederic <fred.kon...@greensocs.com> Clean the init and the exit function. It should be applied when all the device have been refactored.
Signed-off-by: KONRAD Frederic <fred.kon...@greensocs.com> --- hw/virtio.c | 15 --------------- hw/virtio.h | 4 ---- 2 files changed, 19 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index d124ca0..39cdebe 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -908,12 +908,6 @@ void virtio_common_cleanup(VirtIODevice *vdev) g_free(vdev->vq); } -void virtio_cleanup(VirtIODevice *vdev) -{ - virtio_common_cleanup(vdev); - g_free(vdev); -} - static void virtio_vmstate_change(void *opaque, int running, RunState state) { VirtIODevice *vdev = opaque; @@ -963,15 +957,6 @@ void virtio_init(VirtIODevice *vdev, const char *name, vdev); } -VirtIODevice *virtio_common_init(const char *name, uint16_t device_id, - size_t config_size, size_t struct_size) -{ - VirtIODevice *vdev; - vdev = g_malloc0(struct_size); - virtio_init(vdev, name, device_id, config_size); - return vdev; -} - hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n) { return vdev->vq[n].vring.desc; diff --git a/hw/virtio.h b/hw/virtio.h index 82726a3..de46098 100644 --- a/hw/virtio.h +++ b/hw/virtio.h @@ -162,8 +162,6 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f); int virtio_load(VirtIODevice *vdev, QEMUFile *f); -void virtio_cleanup(VirtIODevice *vdev); - void virtio_notify_config(VirtIODevice *vdev); void virtio_queue_set_notification(VirtQueue *vq, int enable); @@ -174,8 +172,6 @@ int virtio_queue_empty(VirtQueue *vq); /* Host binding interface. */ -VirtIODevice *virtio_common_init(const char *name, uint16_t device_id, - size_t config_size, size_t struct_size); uint32_t virtio_config_readb(VirtIODevice *vdev, uint32_t addr); uint32_t virtio_config_readw(VirtIODevice *vdev, uint32_t addr); uint32_t virtio_config_readl(VirtIODevice *vdev, uint32_t addr); -- 1.7.11.7