summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorPaolo Bonzini2014-08-04 23:11:06 +0200
committerStefan Hajnoczi2014-08-15 19:03:12 +0200
commit1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7 (patch)
tree544def307c14f511d60dfcb892bed7a700ced519 /hw/ide/core.c
parentide: stash aiocb for flushes (diff)
downloadqemu-1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7.tar.gz
qemu-1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7.tar.xz
qemu-1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7.zip
ide: simplify reset callbacks
Drop the unused return value and make the callback optional. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 79985f9f49..4183a3abe2 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2088,7 +2088,9 @@ void ide_bus_reset(IDEBus *bus)
}
/* reset dma provider too */
- bus->dma->ops->reset(bus->dma);
+ if (bus->dma->ops->reset) {
+ bus->dma->ops->reset(bus->dma);
+ }
}
static bool ide_cd_is_tray_open(void *opaque)
@@ -2226,7 +2228,6 @@ static const IDEDMAOps ide_dma_nop_ops = {
.add_status = ide_nop_int,
.set_inactive = ide_nop,
.restart_cb = ide_nop_restart,
- .reset = ide_nop,
};
static IDEDMA ide_dma_nop = {