uvcvideo v6.11 regression fix: fix custom control mapping probing
Unified · Split
| @@ -2680,6 +2680,10 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, · 2679 unmodified lines | ||
| 2680 | 2680 | for (i = 0; i < ARRAY_SIZE(uvc_ctrl_mappings); ++i) { |
| 2681 | 2681 | const struct uvc_control_mapping *mapping = &uvc_ctrl_mappings[i]; |
| 2682 | 2682 | |
| 2683 | + if (!uvc_entity_match_guid(ctrl->entity, mapping->entity) || | |
| 2684 | + ctrl->info.selector != mapping->selector) | |
| 2685 | + continue; | |
| 2686 | + | |
| 2683 | 2687 | /* Let the device provide a custom mapping. */ |
| 2684 | 2688 | if (mapping->filter_mapping) { |
| 2685 | 2689 | mapping = mapping->filter_mapping(chain, ctrl); |
| @@ -2687,9 +2691,7 @@ static void uvc_ctrl_init_ctrl(struct uvc_video_chain *chain, · 1 unmodified line | ||
| 2687 | 2691 | continue; |
| 2688 | 2692 | } |
| 2689 | 2693 | |
| 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); | |
| 2693 | 2695 | } |
| 2694 | 2696 | } |
| 2695 | 2697 | |