aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/via.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2020-03-13 08:24:38 +0000
committerJohn Snow <jsnow@redhat.com>2020-03-16 21:08:21 -0400
commit75f2b28baed4ab71bb96d1d0c8571f3467c5b06c (patch)
tree2383695410a10d8c349c15668994c450e41a12da /hw/ide/via.c
parentd32a4f3bdf4ad85672d41a245c090da79482bf85 (diff)
downloadqemu-75f2b28baed4ab71bb96d1d0c8571f3467c5b06c.zip
qemu-75f2b28baed4ab71bb96d1d0c8571f3467c5b06c.tar.gz
qemu-75f2b28baed4ab71bb96d1d0c8571f3467c5b06c.tar.bz2
via-ide: move registration of VMStateDescription to DeviceClass
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 20200313082444.2439-2-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide/via.c')
-rw-r--r--hw/ide/via.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/via.c b/hw/ide/via.c
index 096de8d..84f0eff 100644
--- a/hw/ide/via.c
+++ b/hw/ide/via.c
@@ -190,8 +190,6 @@ static void via_ide_realize(PCIDevice *dev, Error **errp)
bmdma_setup_bar(d);
pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar);
- vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d);
-
for (i = 0; i < 2; i++) {
ide_bus_new(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2);
ide_init2(&d->bus[i], qemu_allocate_irq(via_ide_set_irq, d, i));
@@ -227,6 +225,7 @@ static void via_ide_class_init(ObjectClass *klass, void *data)
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
dc->reset = via_ide_reset;
+ dc->vmsd = &vmstate_ide_pci;
k->realize = via_ide_realize;
k->exit = via_ide_exitfn;
k->vendor_id = PCI_VENDOR_ID_VIA;