From f878c916077d510be3276dad7c36f606cdcea80a Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 23 Feb 2015 11:17:52 -0500 Subject: ide: introduce ide_register_restart_cb A helper is added that registers the IDEDMAOp .restart_cb() via qemu_add_vm_change_state_handler instead of requiring each HBA to register the callback themselves. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow Message-id: 1424708286-16483-4-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- hw/ide/piix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw/ide/piix.c') diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b0172fb..247dd4f 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -143,8 +143,7 @@ static void pci_piix_init_ports(PCIIDEState *d) { bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - qemu_add_vm_change_state_handler(d->bus[i].dma->ops->restart_cb, - &d->bmdma[i].dma); + ide_register_restart_cb(&d->bus[i]); } } -- cgit v1.1