]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
cmd646: register vmstate_ide_pci VMStateDescription in DeviceClass
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Sat, 7 Mar 2020 15:15:36 +0000 (15:15 +0000)
committerJohn Snow <jsnow@redhat.com>
Tue, 10 Mar 2020 02:38:13 +0000 (22:38 -0400)
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20200307151536.32709-3-mark.cave-ayland@ilande.co.uk
Signed-off-by: John Snow <jsnow@redhat.com>
hw/ide/cmd646.c

index 2f11d8de241116f780c6863cc070deaccd1391b6..3c4f765bd6d2bc8d30b4251151f52eeed6132539 100644 (file)
@@ -301,8 +301,6 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp)
         ide_register_restart_cb(&d->bus[i]);
     }
     g_free(irq);
-
-    vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
 }
 
 static void pci_cmd646_ide_exitfn(PCIDevice *dev)
@@ -339,6 +337,7 @@ static void cmd646_ide_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
     dc->reset = cmd646_reset;
+    dc->vmsd = &vmstate_ide_pci;
     k->realize = pci_cmd646_ide_realize;
     k->exit = pci_cmd646_ide_exitfn;
     k->vendor_id = PCI_VENDOR_ID_CMD;