diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-23 11:17:52 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-03-10 14:02:22 +0100 |
commit | f878c916077d510be3276dad7c36f606cdcea80a (patch) | |
tree | c98666cdab1864856ce4a29674dc29637e685b26 /hw/ide/cmd646.c | |
parent | bd8892c4e6d681517c687ec5ac86eed46b3bb23b (diff) | |
download | hqemu-f878c916077d510be3276dad7c36f606cdcea80a.zip hqemu-f878c916077d510be3276dad7c36f606cdcea80a.tar.gz |
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 <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1424708286-16483-4-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/cmd646.c')
-rw-r--r-- | hw/ide/cmd646.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index c8b0322..0374653 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -368,8 +368,7 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) 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]); } vmstate_register(DEVICE(dev), 0, &vmstate_ide_pci, d); |