Skip to content

Commit

Permalink
usb: dwc2: gadget: change variable name to more meaningful
Browse files Browse the repository at this point in the history
Since we handle FIFOs and endpoint separately, using variable named 'ep'
in context of FIFO is misleading, hence we rename it to 'fifo'.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Robert Baldyga authored and Felipe Balbi committed Aug 31, 2016
1 parent aa381a7 commit ba48eab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/usb/dwc2/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void dwc2_hsotg_ctrl_epint(struct dwc2_hsotg *hsotg,
*/
static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
{
unsigned int ep;
unsigned int fifo;
unsigned int addr;
int timeout;
u32 dptxfsizn;
Expand Down Expand Up @@ -217,16 +217,16 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
* them to endpoints dynamically according to maxpacket size value of
* given endpoint.
*/
for (ep = 1; ep < MAX_EPS_CHANNELS; ep++) {
dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(ep));
for (fifo = 1; fifo < MAX_EPS_CHANNELS; fifo++) {
dptxfsizn = dwc2_readl(hsotg->regs + DPTXFSIZN(fifo));

val = (dptxfsizn & FIFOSIZE_DEPTH_MASK) | addr;
addr += dptxfsizn >> FIFOSIZE_DEPTH_SHIFT;

if (addr > hsotg->fifo_mem)
break;

dwc2_writel(val, hsotg->regs + DPTXFSIZN(ep));
dwc2_writel(val, hsotg->regs + DPTXFSIZN(fifo));
}

/*
Expand Down

0 comments on commit ba48eab

Please sign in to comment.