projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
997f4f8
)
usb: dwc3: gadget: Remove redundant check
author
Amit Virdi
<amit.virdi@st.com>
Fri, 19 Dec 2014 07:10:17 +0000
(12:40 +0530)
committer
Felipe Balbi
<balbi@ti.com>
Mon, 12 Jan 2015 18:13:24 +0000
(12:13 -0600)
dwc3_gadget_init_hw_endpoints calls dwc3_alloc_trb_pool only if epnum is not
equal to 0 or 1. Hence, rechecking it in the called function is redundant.
Signed-off-by: Amit Virdi <amit.virdi@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/dwc3/gadget.c
b/drivers/usb/dwc3/gadget.c
index bd9f48d0dff81776e7eb5cd2c1e45f6f386a4638..4e2593993fae4f545bd4f6caf3847381804ea5ed 100644
(file)
--- a/
drivers/usb/dwc3/gadget.c
+++ b/
drivers/usb/dwc3/gadget.c
@@
-352,9
+352,6
@@
static int dwc3_alloc_trb_pool(struct dwc3_ep *dep)
if (dep->trb_pool)
return 0;
- if (dep->number == 0 || dep->number == 1)
- return 0;
-
dep->trb_pool = dma_alloc_coherent(dwc->dev,
sizeof(struct dwc3_trb) * DWC3_TRB_NUM,
&dep->trb_pool_dma, GFP_KERNEL);