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

Commit 4daa1cea authored by Sriharsha Allenki's avatar Sriharsha Allenki Committed by Vijayavardhan Vennapusa
Browse files

usb: gadget: f_uvc: Fix incorrect frame indexing



Each format descriptor should be followed by frame
descriptors with indexes starting from 1.
The current driver does not reset the frame
index to 1 for every format resulting in
incorrect frame index.
Fix this by resetting the loop variable before
each loop for populating frame descriptors.

Change-Id: I3c3e0ab4808409d059bcbf93d2bb45bbb6efeada
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent ba296efe
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2158,6 +2158,7 @@ static int __uvcg_iter_strm_cls(struct uvcg_streaming_header *h,
		if (ret)
			return ret;
		grp = &f->fmt->group;
		j = 0;
		list_for_each_entry(item, &grp->cg_children, ci_entry) {
			frm = to_uvcg_frame(item);
			ret = fun(frm, priv2, priv3, j++, UVCG_FRAME);