usb: dwc3: calculate number of event buffers dynamically

This will allow us to only allocate memory when
we actually need.

Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Felipe Balbi
2011-10-12 10:31:04 +03:00
parent 6c167fc9b0
commit 9f622b2a40
3 changed files with 18 additions and 13 deletions

View File

@@ -1925,7 +1925,7 @@ static irqreturn_t dwc3_interrupt(int irq, void *_dwc)
spin_lock(&dwc->lock);
for (i = 0; i < DWC3_EVENT_BUFFERS_NUM; i++) {
for (i = 0; i < dwc->num_event_buffers; i++) {
irqreturn_t status;
status = dwc3_process_event_buf(dwc, i);