Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1298706
| From | Robert Baldyga <r.baldyga@samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/5] usb: dwc2: gadget: change variable name to more meaningful |
| Date | 2015-12-28 17:30 +0100 |
| Message-ID | <qKIQk-4yb-27@gated-at.bofh.it> (permalink) |
| References | <qKIQi-4yb-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/usb/dwc2/gadget.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index ad3527e..b853575 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -167,7 +167,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;
@@ -198,8 +198,8 @@ 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;
@@ -207,7 +207,7 @@ static void dwc2_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
if (addr > hsotg->fifo_mem)
break;
- dwc2_writel(val, hsotg->regs + DPTXFSIZN(ep));
+ dwc2_writel(val, hsotg->regs + DPTXFSIZN(fifo));
}
/*
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] usb: dwc2: gadget: Fix TX FIFO handling Robert Baldyga <r.baldyga@samsung.com> - 2015-12-28 17:30 +0100 [PATCH 3/5] usb: dwc2: gadget: change variable name to more meaningful Robert Baldyga <r.baldyga@samsung.com> - 2015-12-28 17:30 +0100 [PATCH 2/5] usb: dwc2: gadget: fix TX FIFO size and address initialization Robert Baldyga <r.baldyga@samsung.com> - 2015-12-28 17:30 +0100 [PATCH 1/5] usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers Robert Baldyga <r.baldyga@samsung.com> - 2015-12-28 17:30 +0100
csiph-web