mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
usb: dwc3: gadget: fix DMA offset calculation
Fix offset calculation in dwc3_trb_dma_offset() Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
5275455a6e
commit
c439ef87c3
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ int dwc3_send_gadget_ep_cmd(struct dwc3 *dwc, unsigned ep,
|
||||||
static dma_addr_t dwc3_trb_dma_offset(struct dwc3_ep *dep,
|
static dma_addr_t dwc3_trb_dma_offset(struct dwc3_ep *dep,
|
||||||
struct dwc3_trb_hw *trb)
|
struct dwc3_trb_hw *trb)
|
||||||
{
|
{
|
||||||
u32 offset = trb - dep->trb_pool;
|
u32 offset = (char *) trb - (char *) dep->trb_pool;
|
||||||
|
|
||||||
return dep->trb_pool_dma + offset;
|
return dep->trb_pool_dma + offset;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue