Skip to content

Commit d8be0c6

Browse files
huthmstsirkin
authored andcommitted
hw/virtio/virtio-balloon: Remove the "class" property
This property was only required for compatibility reasons in the pc-1.0 machine type and earlier. Now that these machine types have been removed, the property is not useful anymore. Signed-off-by: Thomas Huth <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: David Hildenbrand <[email protected]>
1 parent f862ddb commit d8be0c6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

hw/virtio/virtio-balloon-pci.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,13 @@ struct VirtIOBalloonPCI {
3434
VirtIOPCIProxy parent_obj;
3535
VirtIOBalloon vdev;
3636
};
37-
static Property virtio_balloon_pci_properties[] = {
38-
DEFINE_PROP_UINT32("class", VirtIOPCIProxy, class_code, 0),
39-
DEFINE_PROP_END_OF_LIST(),
40-
};
4137

4238
static void virtio_balloon_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
4339
{
4440
VirtIOBalloonPCI *dev = VIRTIO_BALLOON_PCI(vpci_dev);
4541
DeviceState *vdev = DEVICE(&dev->vdev);
4642

47-
if (vpci_dev->class_code != PCI_CLASS_OTHERS &&
48-
vpci_dev->class_code != PCI_CLASS_MEMORY_RAM) { /* qemu < 1.1 */
49-
vpci_dev->class_code = PCI_CLASS_OTHERS;
50-
}
51-
43+
vpci_dev->class_code = PCI_CLASS_OTHERS;
5244
qdev_realize(vdev, BUS(&vpci_dev->bus), errp);
5345
}
5446

@@ -59,7 +51,6 @@ static void virtio_balloon_pci_class_init(ObjectClass *klass, void *data)
5951
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
6052
k->realize = virtio_balloon_pci_realize;
6153
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
62-
device_class_set_props(dc, virtio_balloon_pci_properties);
6354
pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
6455
pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_BALLOON;
6556
pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;

0 commit comments

Comments
 (0)