Skip to content

Commit e2ed536

Browse files
author
Hans Verkuil
committed
Merge tag 'tags/fixes-media-uvc-20230722' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux.git
uvcvideo v6.11 regression fix: fix custom control mapping probing Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2 parents 914f896 + 6655853 commit e2ed536

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/media/usb/uvc/uvc_ctrl.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,16 +2680,18 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
26802680
for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) {
26812681
const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i];
26822682

2683+
if (!uvc_entity_match_guid(ctrl->entity, mapping->entity) ||
2684+
ctrl->info.selector != mapping->selector)
2685+
continue;
2686+
26832687
/* Let the device provide a custom mapping. */
26842688
if (mapping->filter_mapping) {
26852689
mapping = mapping->filter_mapping(chain, ctrl);
26862690
if (!mapping)
26872691
continue;
26882692
}
26892693

2690-
if (uvc_entity_match_guid(ctrl->entity, mapping->entity) &&
2691-
ctrl->info.selector == mapping->selector)
2692-
__uvc_ctrl_add_mapping(chain, ctrl, mapping);
2694+
__uvc_ctrl_add_mapping(chain, ctrl, mapping);
26932695
}
26942696
}
26952697

0 commit comments

Comments
 (0)