aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio-pci.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-12-22 11:05:00 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-02-03 10:41:07 -0600
commit6acbe4c6f18e7de00481ff30574262b58526de45 (patch)
treec3d9c37baaa10d2b0d14973e6cfa452914129bd7 /hw/virtio-pci.c
parentd307af795d9fb25680339288a10c9e297e102826 (diff)
qdev: remove baked in notion of aliases (v2)
Limit them to the device_add functionality. Device aliases were a hack based on the fact that virtio was modeled the wrong way. The mechanism for aliasing is very limited in that only one alias can exist for any device. We have to support it for the purposes of compatibility but we only need to support it in device_add so restrict it to that piece of code. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Use a table for aliases (Paolo)
Diffstat (limited to 'hw/virtio-pci.c')
-rw-r--r--hw/virtio-pci.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index bc96552072..93fff54782 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -827,7 +827,6 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIRTIO_BLOCK;
k->revision = VIRTIO_PCI_ABI_VERSION;
k->class_id = PCI_CLASS_STORAGE_SCSI;
- dc->alias = "virtio-blk";
dc->reset = virtio_pci_reset;
dc->props = virtio_blk_properties;
}
@@ -862,7 +861,6 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIRTIO_NET;
k->revision = VIRTIO_PCI_ABI_VERSION;
k->class_id = PCI_CLASS_NETWORK_ETHERNET;
- dc->alias = "virtio-net";
dc->reset = virtio_pci_reset;
dc->props = virtio_net_properties;
}
@@ -894,7 +892,6 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
k->revision = VIRTIO_PCI_ABI_VERSION;
k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
- dc->alias = "virtio-serial";
dc->reset = virtio_pci_reset;
dc->props = virtio_serial_properties;
}
@@ -922,7 +919,6 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data)
k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
k->revision = VIRTIO_PCI_ABI_VERSION;
k->class_id = PCI_CLASS_MEMORY_RAM;
- dc->alias = "virtio-balloon";
dc->reset = virtio_pci_reset;
dc->props = virtio_balloon_properties;
}
@@ -937,13 +933,9 @@ static TypeInfo virtio_balloon_info = {
static void virtio_pci_register_devices(void)
{
type_register_static(&virtio_blk_info);
- type_register_static_alias(&virtio_blk_info, "virtio-blk");
type_register_static(&virtio_net_info);
- type_register_static_alias(&virtio_net_info, "virtio-net");
type_register_static(&virtio_serial_info);
- type_register_static_alias(&virtio_serial_info, "virtio-serial");
type_register_static(&virtio_balloon_info);
- type_register_static_alias(&virtio_balloon_info, "virtio-balloon");
}
device_init(virtio_pci_register_devices)