diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2012-03-27 13:42:23 +1100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-05 14:54:40 +0200 |
commit | 43cf8ae69ba8510e45d7bd42dd67bc8ae13c48ec (patch) | |
tree | 0fc8d3f2f4b0f75034c8b00d42897d2ea14e88a0 /hw/ide/macio.c | |
parent | eb9566d13e30dd7e20d978632a13915cbdb9a668 (diff) | |
download | hqemu-43cf8ae69ba8510e45d7bd42dd67bc8ae13c48ec.zip hqemu-43cf8ae69ba8510e45d7bd42dd67bc8ae13c48ec.tar.gz |
Use DMADirection type for dma_bdrv_io
Currently dma_bdrv_io() takes a 'to_dev' boolean parameter to
determine the direction of DMA it is emulating. We already have a
DMADirection enum designed specifically to encode DMA directions.
This patch uses it for dma_bdrv_io() as well. This involves removing
the DMADirection definition from the #ifdef it was inside, but since that
only existed to protect the definition of dma_addr_t from places where
config.h is not included, there wasn't any reason for it to be there in
the first place.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/macio.c')
-rw-r--r-- | hw/ide/macio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/macio.c b/hw/ide/macio.c index a4df244..7b38d9e 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -149,7 +149,8 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) break; case IDE_DMA_TRIM: m->aiocb = dma_bdrv_io(s->bs, &s->sg, sector_num, - ide_issue_trim, pmac_ide_transfer_cb, s, true); + ide_issue_trim, pmac_ide_transfer_cb, s, + DMA_DIRECTION_TO_DEVICE); break; } return; |