summaryrefslogtreecommitdiff
path: root/hw/usb/libhw.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-04-10 18:15:49 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2013-06-20 16:39:52 +0200
commitdf32fd1c9f53dd3b7abd28e29f851965039eabda (patch)
tree37996235c390c2c368f595090642b1aedea3b5db /hw/usb/libhw.c
parent96478592a93f93322ecc20d0a6eccb4d4ef33c7a (diff)
downloadqemu-df32fd1c9f53dd3b7abd28e29f851965039eabda.tar.gz
dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now always already available. Make everyone hold the address space directly, and clean up the DMA API to use the AddressSpace directly. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/usb/libhw.c')
-rw-r--r--hw/usb/libhw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/usb/libhw.c b/hw/usb/libhw.c
index d2d4b51b94..8df11c461f 100644
--- a/hw/usb/libhw.c
+++ b/hw/usb/libhw.c
@@ -37,7 +37,7 @@ int usb_packet_map(USBPacket *p, QEMUSGList *sgl)
while (len) {
dma_addr_t xlen = len;
- mem = dma_memory_map(sgl->dma, base, &xlen, dir);
+ mem = dma_memory_map(sgl->as, base, &xlen, dir);
if (!mem) {
goto err;
}
@@ -63,7 +63,7 @@ void usb_packet_unmap(USBPacket *p, QEMUSGList *sgl)
int i;
for (i = 0; i < p->iov.niov; i++) {
- dma_memory_unmap(sgl->dma, p->iov.iov[i].iov_base,
+ dma_memory_unmap(sgl->as, p->iov.iov[i].iov_base,
p->iov.iov[i].iov_len, dir,
p->iov.iov[i].iov_len);
}