diff options
Diffstat (limited to 'hw/ide/via.c')
-rw-r--r-- | hw/ide/via.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide/via.c b/hw/ide/via.c index 78857e8020..2603110ced 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -78,9 +78,10 @@ static void bmdma_map(PCIDevice *pci_dev, int region_num, for(i = 0;i < 2; i++) { BMDMAState *bm = &d->bmdma[i]; - d->bus[i].bmdma = bm; + bmdma_init(&d->bus[i], bm); bm->bus = d->bus+i; - qemu_add_vm_change_state_handler(ide_dma_restart_cb, bm); + qemu_add_vm_change_state_handler(d->bus[i].dma->ops->restart_cb, + &bm->dma); register_ioport_write(addr, 1, 1, bmdma_cmd_writeb, bm); @@ -101,7 +102,6 @@ static void via_reset(void *opaque) for (i = 0; i < 2; i++) { ide_bus_reset(&d->bus[i]); - ide_dma_reset(&d->bmdma[i]); } pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_WAIT); |