diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-23 11:17:54 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-03-10 14:02:22 +0100 |
commit | d34fceda8feb6c36722f41f3e1db40cf2af82ea8 (patch) | |
tree | d31f998983457de2550800da16ae1d1f2b6f310c /hw/ide/pci.c | |
parent | 2745df813d82724f2633a9b2ba7f7c5717d7509b (diff) |
ide: pass IDEBus to the restart_cb
Pass the containing IDEBus to the restart_cb instead
of the more specific BMDMAState child.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1424708286-16483-6-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/pci.c')
-rw-r--r-- | hw/ide/pci.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 62c88d7f6f..45254d466c 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -208,8 +208,8 @@ static void ide_restart_dma(IDEState *s, enum ide_dma_cmd dma_cmd) /* TODO This should be common IDE code */ static void bmdma_restart_bh(void *opaque) { - BMDMAState *bm = opaque; - IDEBus *bus = bm->bus; + IDEBus *bus = opaque; + BMDMAState *bm = DO_UPCAST(BMDMAState, dma, bus->dma); IDEState *s; bool is_read; int error_status; @@ -260,14 +260,14 @@ static void bmdma_restart_bh(void *opaque) static void bmdma_restart_cb(void *opaque, int running, RunState state) { - IDEDMA *dma = opaque; - BMDMAState *bm = DO_UPCAST(BMDMAState, dma, dma); + IDEBus *bus = opaque; + BMDMAState *bm = DO_UPCAST(BMDMAState, dma, bus->dma); if (!running) return; if (!bm->bh) { - bm->bh = qemu_bh_new(bmdma_restart_bh, &bm->dma); + bm->bh = qemu_bh_new(bmdma_restart_bh, bus); qemu_bh_schedule(bm->bh); } } |