Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- hw/misc/pci-testdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c index 71ce5a3..731748a 100644 --- a/hw/misc/pci-testdev.c +++ b/hw/misc/pci-testdev.c @@ -272,8 +272,9 @@ static int pci_testdev_init(PCIDevice *pci_dev) } static void -pci_testdev_uninit(PCIDevice *dev) +pci_testdev_instance_finalize(Object *obj) { + PCIDevice *dev = PCI_DEVICE(obj); PCITestDevState *d = DO_UPCAST(PCITestDevState, dev, dev); int i; @@ -301,7 +302,6 @@ static void pci_testdev_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->init = pci_testdev_init; - k->exit = pci_testdev_uninit; k->vendor_id = PCI_VENDOR_ID_REDHAT; k->device_id = PCI_DEVICE_ID_REDHAT_TEST; k->revision = 0x00; @@ -315,6 +315,7 @@ static const TypeInfo pci_testdev_info = { .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(PCITestDevState), .class_init = pci_testdev_class_init, + .instance_finalize = pci_testdev_instance_finalize, }; static void pci_testdev_register_types(void) -- 1.8.1.4