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

Commit 9aa62ae4 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: dwc3: gadget: move direction setting up



no functional changes, just grouping dep
initialization.

Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ff62d6b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1642,13 +1642,13 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,

		dep->dwc = dwc;
		dep->number = epnum;
		dep->direction = !!direction;
		dwc->eps[epnum] = dep;

		snprintf(dep->name, sizeof(dep->name), "ep%d%s", epnum >> 1,
				(epnum & 1) ? "in" : "out");

		dep->endpoint.name = dep->name;
		dep->direction = (epnum & 1);

		if (epnum == 0 || epnum == 1) {
			dep->endpoint.maxpacket = 512;