aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu-pci.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2018-12-05 17:57:03 -0200
committerMichael S. Tsirkin <mst@redhat.com>2018-12-19 16:48:16 -0500
commita4ee4c8baa37154f42b4dc6a13fee79268d15238 (patch)
treedda207c6f2ce1514b448ba6c8595980dcd2c6b99 /hw/display/virtio-gpu-pci.c
parent2b4e573c7c7b9a698ba6931ba456bbd8d3d8c84c (diff)
downloadqemu-a4ee4c8baa37154f42b4dc6a13fee79268d15238.zip
qemu-a4ee4c8baa37154f42b4dc6a13fee79268d15238.tar.gz
qemu-a4ee4c8baa37154f42b4dc6a13fee79268d15238.tar.bz2
virtio: Helper for registering virtio device types
Introduce a helper for registering different flavours of virtio devices. Convert code to use the helper, but keep only the existing generic types. Transitional and non-transitional device types will be added by another patch. Acked-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu-pci.c')
-rw-r--r--hw/display/virtio-gpu-pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/display/virtio-gpu-pci.c b/hw/display/virtio-gpu-pci.c
index cece4aa..faf76a8 100644
--- a/hw/display/virtio-gpu-pci.c
+++ b/hw/display/virtio-gpu-pci.c
@@ -69,9 +69,8 @@ static void virtio_gpu_initfn(Object *obj)
TYPE_VIRTIO_GPU);
}
-static const TypeInfo virtio_gpu_pci_info = {
- .name = TYPE_VIRTIO_GPU_PCI,
- .parent = TYPE_VIRTIO_PCI,
+static const VirtioPCIDeviceTypeInfo virtio_gpu_pci_info = {
+ .generic_name = TYPE_VIRTIO_GPU_PCI,
.instance_size = sizeof(VirtIOGPUPCI),
.instance_init = virtio_gpu_initfn,
.class_init = virtio_gpu_pci_class_init,
@@ -79,6 +78,6 @@ static const TypeInfo virtio_gpu_pci_info = {
static void virtio_gpu_pci_register_types(void)
{
- type_register_static(&virtio_gpu_pci_info);
+ virtio_pci_types_register(&virtio_gpu_pci_info);
}
type_init(virtio_gpu_pci_register_types)