diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 530c2468dd66..b7879fd82674 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -2337,12 +2337,14 @@ irq_retry: dev_dbg(hsotg->dev, "%s: daint=%08x\n", __func__, daint); - for (ep = 0; ep < 15 && daint_out; ep++, daint_out >>= 1) { + for (ep = 0; ep < hsotg->num_of_eps && daint_out; + ep++, daint_out >>= 1) { if (daint_out & 1) s3c_hsotg_epint(hsotg, ep, 0); } - for (ep = 0; ep < 15 && daint_in; ep++, daint_in >>= 1) { + for (ep = 0; ep < hsotg->num_of_eps && daint_in; + ep++, daint_in >>= 1) { if (daint_in & 1) s3c_hsotg_epint(hsotg, ep, 1); } |