Commit e2c19314 authored by Tony Lindgren's avatar Tony Lindgren

musb_hdrc: Search and replace nEnd with epnum

Search and replace nEnd with epnum
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 9e0be0c6
...@@ -1331,8 +1331,8 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep) ...@@ -1331,8 +1331,8 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep)
{ {
struct musb_ep *musb_ep = to_musb_ep(ep); struct musb_ep *musb_ep = to_musb_ep(ep);
struct musb *musb = musb_ep->musb; struct musb *musb = musb_ep->musb;
u8 nEnd = musb_ep->current_epnum; u8 epnum = musb_ep->current_epnum;
void __iomem *epio = musb->endpoints[nEnd].regs; void __iomem *epio = musb->endpoints[epnum].regs;
void __iomem *mbase; void __iomem *mbase;
unsigned long flags; unsigned long flags;
u16 csr, int_txe; u16 csr, int_txe;
...@@ -1340,11 +1340,11 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep) ...@@ -1340,11 +1340,11 @@ static void musb_gadget_fifo_flush(struct usb_ep *ep)
mbase = musb->mregs; mbase = musb->mregs;
spin_lock_irqsave(&musb->lock, flags); spin_lock_irqsave(&musb->lock, flags);
musb_ep_select(mbase, (u8) nEnd); musb_ep_select(mbase, (u8) epnum);
/* disable interrupts */ /* disable interrupts */
int_txe = musb_readw(mbase, MUSB_INTRTXE); int_txe = musb_readw(mbase, MUSB_INTRTXE);
musb_writew(mbase, MUSB_INTRTXE, int_txe & ~(1 << nEnd)); musb_writew(mbase, MUSB_INTRTXE, int_txe & ~(1 << epnum));
if (musb_ep->is_in) { if (musb_ep->is_in) {
csr = musb_readw(epio, MUSB_TXCSR); csr = musb_readw(epio, MUSB_TXCSR);
......
...@@ -1661,7 +1661,7 @@ static int musb_schedule( ...@@ -1661,7 +1661,7 @@ static int musb_schedule(
{ {
int idle; int idle;
int best_diff; int best_diff;
int best_end, nEnd; int best_end, epnum;
struct musb_hw_ep *hw_ep = NULL; struct musb_hw_ep *hw_ep = NULL;
struct list_head *head = NULL; struct list_head *head = NULL;
...@@ -1706,12 +1706,12 @@ static int musb_schedule( ...@@ -1706,12 +1706,12 @@ static int musb_schedule(
best_diff = 4096; best_diff = 4096;
best_end = -1; best_end = -1;
for (nEnd = 1; nEnd < musb->nr_endpoints; nEnd++) { for (epnum = 1; epnum < musb->nr_endpoints; epnum++) {
int diff; int diff;
if (musb->periodic[nEnd]) if (musb->periodic[epnum])
continue; continue;
hw_ep = &musb->endpoints[nEnd]; hw_ep = &musb->endpoints[epnum];
if (hw_ep == musb->bulk_ep) if (hw_ep == musb->bulk_ep)
continue; continue;
...@@ -1722,7 +1722,7 @@ static int musb_schedule( ...@@ -1722,7 +1722,7 @@ static int musb_schedule(
if (diff > 0 && best_diff > diff) { if (diff > 0 && best_diff > diff) {
best_diff = diff; best_diff = diff;
best_end = nEnd; best_end = epnum;
} }
} }
if (best_end < 0) if (best_end < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment