diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-04 17:11:09 -0400 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-15 18:03:12 +0100 |
commit | 446351236b6e9c53b25e30d107c6235347df1dde (patch) | |
tree | d1edeac3f954425c0fdef9d89625ef9f4db2a26f /hw/ide/core.c | |
parent | c039cb1e5a7bf1f71fddbbe199eff7fbbfddb416 (diff) |
ide: simplify start_transfer 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 | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index d52a6f6104..e5ddecb811 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -434,7 +434,9 @@ void ide_transfer_start(IDEState *s, uint8_t *buf, int size, if (!(s->status & ERR_STAT)) { s->status |= DRQ_STAT; } - s->bus->dma->ops->start_transfer(s->bus->dma); + if (s->bus->dma->ops->start_transfer) { + s->bus->dma->ops->start_transfer(s->bus->dma); + } } void ide_transfer_stop(IDEState *s) @@ -2207,11 +2209,6 @@ static void ide_nop_start(IDEDMA *dma, IDEState *s, { } -static int ide_nop(IDEDMA *dma) -{ - return 0; -} - static int ide_nop_int(IDEDMA *dma, int x) { return 0; @@ -2223,7 +2220,6 @@ static void ide_nop_restart(void *opaque, int x, RunState y) static const IDEDMAOps ide_dma_nop_ops = { .start_dma = ide_nop_start, - .start_transfer = ide_nop, .prepare_buf = ide_nop_int, .rw_buf = ide_nop_int, .set_unit = ide_nop_int, |