diff options
author | Paolo Bonzini | 2014-08-04 23:11:06 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-08-15 19:03:12 +0200 |
commit | 1374bec0634aac9a460fe3b57bbe8b1aa7a99cb7 (patch) | |
tree | 544def307c14f511d60dfcb892bed7a700ced519 /hw/ide/core.c | |
parent | ide: stash aiocb for flushes (diff) | |
download | qemu-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.c | 5 |
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 = { |