Skip to content

Commit

Permalink
usb: dwc3: gadget: fix DMA offset calculation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Zimmerman authored and Greg Kroah-Hartman committed Oct 4, 2011
1 parent 5275455 commit c439ef8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/dwc3/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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;
}
Expand Down

0 comments on commit c439ef8

Please sign in to comment.