diff options
author | Paolo Bonzini | 2014-08-04 23:11:07 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2014-08-15 19:03:12 +0200 |
commit | 829b933b704a329d60d2ea1fe4c8e8e0a5505d8a (patch) | |
tree | 3533aeabdd24bf42908a34f1812db07f0d60c56c /hw/ide/core.c | |
parent | ide: simplify reset callbacks (diff) | |
download | qemu-829b933b704a329d60d2ea1fe4c8e8e0a5505d8a.tar.gz qemu-829b933b704a329d60d2ea1fe4c8e8e0a5505d8a.tar.xz qemu-829b933b704a329d60d2ea1fe4c8e8e0a5505d8a.zip |
ide: simplify set_inactive 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 4183a3abe2..d52a6f6104 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -595,7 +595,9 @@ static void ide_async_cmd_done(IDEState *s) void ide_set_inactive(IDEState *s) { s->bus->dma->aiocb = NULL; - s->bus->dma->ops->set_inactive(s->bus->dma); + if (s->bus->dma->ops->set_inactive) { + s->bus->dma->ops->set_inactive(s->bus->dma); + } ide_async_cmd_done(s); } @@ -2226,7 +2228,6 @@ static const IDEDMAOps ide_dma_nop_ops = { .rw_buf = ide_nop_int, .set_unit = ide_nop_int, .add_status = ide_nop_int, - .set_inactive = ide_nop, .restart_cb = ide_nop_restart, }; |