dma-mapping: fix the prototype of dma_unmap_single()
dma_unmap_single() takes the dma address, not virtual address.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index c506652..6ad1000 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -288,8 +288,8 @@
return 0;
err1:
- dma_unmap_single((void *)(uintptr_t)dwc->scratch_addr, dwc->nr_scratch *
- DWC3_SCRATCHBUF_SIZE, DMA_BIDIRECTIONAL);
+ dma_unmap_single(scratch_addr, dwc->nr_scratch * DWC3_SCRATCHBUF_SIZE,
+ DMA_BIDIRECTIONAL);
err0:
return ret;
@@ -303,7 +303,7 @@
if (!dwc->nr_scratch)
return;
- dma_unmap_single((void *)(uintptr_t)dwc->scratch_addr, dwc->nr_scratch *
+ dma_unmap_single(dwc->scratch_addr, dwc->nr_scratch *
DWC3_SCRATCHBUF_SIZE, DMA_BIDIRECTIONAL);
kfree(dwc->scratchbuf);
}