Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b96aea04 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: dwc3: gadget: Iterate only over valid endpoints"

parents 8a0eb1b7 56b8b084
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -198,15 +198,11 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
	 * FIFO space. Also consider the case where TxFIFO RAM space
	 * may change dynamically based on the USB configuration.
	 */
	for (num = 0; num < DWC3_ENDPOINTS_NUM; num++) {
		struct dwc3_ep	*dep = dwc->eps[num];
		int		fifo_number = dep->number >> 1;
	for (num = 0; num < dwc->num_in_eps; num++) {
		struct dwc3_ep	*dep = dwc->eps[(num << 1) | 1];
		int		mult = 1;
		int		tmp;

		if (!(dep->number & 1))
			continue;

		if (!(dep->flags & DWC3_EP_ENABLED))
			continue;

@@ -265,8 +261,7 @@ int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc)
			return -ENOMEM;
		}

		dwc3_writel(dwc->regs, DWC3_GTXFIFOSIZ(fifo_number),
				fifo_size);
		dwc3_writel(dwc->regs, DWC3_GTXFIFOSIZ(num), fifo_size);

	}