UPSTREAM: usb: dwc2: gadget: remove dead code from dwc2_hsotg_ep_enable()
Since FIFO is always freed in dwc2_hsotg_ep_disable(), ep->fifo_index
is always 0 in dwc2_hsotg_ep_enable(), hence code inside if() block is
never executed.
Change-Id: Ib72163203bea5565209132ad7d4278ed7056049b
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>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 21f3bb5298)
This commit is contained in:
parent
cf74f8dc0e
commit
888093f2db
1 changed files with 1 additions and 12 deletions
|
|
@ -3043,22 +3043,11 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep,
|
|||
break;
|
||||
}
|
||||
|
||||
/* If fifo is already allocated for this ep */
|
||||
if (hs_ep->fifo_index) {
|
||||
size = hs_ep->ep.maxpacket * hs_ep->mc;
|
||||
/* If bigger fifo is required deallocate current one */
|
||||
if (size > hs_ep->fifo_size) {
|
||||
hsotg->fifo_map &= ~(1 << hs_ep->fifo_index);
|
||||
hs_ep->fifo_index = 0;
|
||||
hs_ep->fifo_size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* if the hardware has dedicated fifos, we must give each IN EP
|
||||
* a unique tx-fifo even if it is non-periodic.
|
||||
*/
|
||||
if (dir_in && hsotg->dedicated_fifos && !hs_ep->fifo_index) {
|
||||
if (dir_in && hsotg->dedicated_fifos) {
|
||||
u32 fifo_index = 0;
|
||||
u32 fifo_size = UINT_MAX;
|
||||
size = hs_ep->ep.maxpacket*hs_ep->mc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue