Commit e2ed5369 authored by Hans Verkuil's avatar Hans Verkuil

Merge tag 'tags/fixes-media-uvc-20230722' of...

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parents 914f8961 66558537
...@@ -2680,6 +2680,10 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, ...@@ -2680,6 +2680,10 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) { for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) {
const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i]; const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i];
if (!uvc_entity_match_guid(ctrl->entity, mapping->entity) ||
ctrl->info.selector != mapping->selector)
continue;
/* Let the device provide a custom mapping. */ /* Let the device provide a custom mapping. */
if (mapping->filter_mapping) { if (mapping->filter_mapping) {
mapping = mapping->filter_mapping(chain, ctrl); mapping = mapping->filter_mapping(chain, ctrl);
...@@ -2687,9 +2691,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, ...@@ -2687,9 +2691,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain,
continue; continue;
} }
if (uvc_entity_match_guid(ctrl->entity, mapping->entity) && __uvc_ctrl_add_mapping(chain, ctrl, mapping);
ctrl->info.selector == mapping->selector)
__uvc_ctrl_add_mapping(chain, ctrl, mapping);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment