aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/atmel_usba_udc.c
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-02-18 21:07:43 -0500
committerFelipe Balbi <balbi@ti.com>2014-02-19 14:46:48 -0500
commitaa7be0f8f7fbd446c7cd5352480d0d10d78f742b (patch)
tree1856ac391a66330c1eb95cdefd0f838af8c1e867 /drivers/usb/gadget/atmel_usba_udc.c
parent2e4c7553cd6f9c68bb741582dcb614edcbeca70f (diff)
usb: gadget: at91: fix the number of endpoint parameter
In sama5d3 SoC, there are 16 endpoints, which is different with earlier SoCs (only have 7 endpoints). The USBA_NR_ENDPOINTS macro is not suitable for sama5d3. So, get the endpoints number through the udc->num_ep, which get from platform data for non-dt kernel, or parse from dt node. Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 52771d4c44bc..53eea030fc15 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -1670,7 +1670,7 @@ static irqreturn_t usba_udc_irq(int irq, void *devid)
1670 if (ep_status) { 1670 if (ep_status) {
1671 int i; 1671 int i;
1672 1672
1673 for (i = 0; i < USBA_NR_ENDPOINTS; i++) 1673 for (i = 0; i < udc->num_ep; i++)
1674 if (ep_status & (1 << i)) { 1674 if (ep_status & (1 << i)) {
1675 if (ep_is_control(&udc->usba_ep[i])) 1675 if (ep_is_control(&udc->usba_ep[i]))
1676 usba_control_irq(udc, &udc->usba_ep[i]); 1676 usba_control_irq(udc, &udc->usba_ep[i]);