[PATCH] Fix memory issue in non-DMA mode for MUSB gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dma_mapping_error function unable to works in PowerPC arch
when MUSB do not use DMA (illegal memory access). Proposed
patch replace its usage to usual define for checking DMA mapping.

Signed-off-by: Alexey Spirkov <alexeis@xxxxxxxxxxxx>
---
 drivers/usb/musb/musb_gadget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c
index eae8b1b..3bc7c25 100644
--- a/drivers/usb/musb/musb_gadget.c
+++ b/drivers/usb/musb/musb_gadget.c
@@ -140,7 +140,7 @@ __acquires(ep->musb->lock)
 	ep->busy = 1;
 	spin_unlock(&musb->lock);
 
-	if (!dma_mapping_error(&musb->g.dev, request->dma))
+	if (req && is_buffer_mapped(req))
 		unmap_dma_buffer(req, musb);
 
 	trace_musb_req_gb(req);
-- 
2.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux