summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-08-04 17:11:06 -0400
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-15 18:03:12 +0100
commit1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7 (patch)
tree544def307c14f511d60dfcb892bed7a700ced519 /hw/ide/core.c
parent69f72a22213a6909bf4aef06133c976b508e370a (diff)
downloadhqemu-1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7.zip
hqemu-1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7.tar.gz
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 79985f9..4183a3a 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 = {
OpenPOWER on IntegriCloud