diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2016-08-29 16:38:57 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-08-31 03:06:06 -0400 |
commit | 21f3bb52986c5f0ab74d350486de38fafff6ddef (patch) | |
tree | 95d55a9c63e11257b1c2b464380551d77b9e1f84 /drivers/usb/dwc2 | |
parent | ba48eab8866ca71e7978380cf7564cf8240f28f8 (diff) |
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.
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>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 2aa41139d2d5..94698298e829 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -3043,22 +3043,11 @@ static int dwc2_hsotg_ep_enable(struct usb_ep *ep, | |||
3043 | break; | 3043 | break; |
3044 | } | 3044 | } |
3045 | 3045 | ||
3046 | /* If fifo is already allocated for this ep */ | ||
3047 | if (hs_ep->fifo_index) { | ||
3048 | size = hs_ep->ep.maxpacket * hs_ep->mc; | ||
3049 | /* If bigger fifo is required deallocate current one */ | ||
3050 | if (size > hs_ep->fifo_size) { | ||
3051 | hsotg->fifo_map &= ~(1 << hs_ep->fifo_index); | ||
3052 | hs_ep->fifo_index = 0; | ||
3053 | hs_ep->fifo_size = 0; | ||
3054 | } | ||
3055 | } | ||
3056 | |||
3057 | /* | 3046 | /* |
3058 | * if the hardware has dedicated fifos, we must give each IN EP | 3047 | * if the hardware has dedicated fifos, we must give each IN EP |
3059 | * a unique tx-fifo even if it is non-periodic. | 3048 | * a unique tx-fifo even if it is non-periodic. |
3060 | */ | 3049 | */ |
3061 | if (dir_in && hsotg->dedicated_fifos && !hs_ep->fifo_index) { | 3050 | if (dir_in && hsotg->dedicated_fifos) { |
3062 | u32 fifo_index = 0; | 3051 | u32 fifo_index = 0; |
3063 | u32 fifo_size = UINT_MAX; | 3052 | u32 fifo_size = UINT_MAX; |
3064 | size = hs_ep->ep.maxpacket*hs_ep->mc; | 3053 | size = hs_ep->ep.maxpacket*hs_ep->mc; |