linux/drivers/media/usb/uvc
Ricardo Ribalda 66558537cb media: uvcvideo: Fix custom control mapping probing
Custom control mapping introduced a bug, where the filter function was
applied to every single control.

Fix it so it is only applied to the matching controls.

The following dmesg errors during probe are now fixed:

usb 1-5: Found UVC 1.00 device Integrated_Webcam_HD (0c45:670c)
usb 1-5: Failed to query (GET_CUR) UVC control 2 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 3 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 6 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 7 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 8 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 9 on unit 2: -75 (exp. 1).
usb 1-5: Failed to query (GET_CUR) UVC control 10 on unit 2: -75 (exp. 1).

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/linux-media/518cd6b4-68a8-4895-b8fc-97d4dae1ddc4@molgen.mpg.de/T/#t
Cc: stable@vger.kernel.org
Fixes: 8f4362a8d4 ("media: uvcvideo: Allow custom control mapping")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Link: https://lore.kernel.org/r/20240722-fix-filter-mapping-v2-1-7ed5bb6c1185@chromium.org
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-07-22 15:22:20 +03:00
..
Kconfig usb: uvc: move uvc_fmts and uvc_format_by_guid to own compile unit 2023-01-31 09:40:42 +01:00
Makefile media: uvcvideo: Add a metadata device node 2018-01-04 06:41:47 -05:00
uvc_ctrl.c media: uvcvideo: Fix custom control mapping probing 2024-07-22 15:22:20 +03:00
uvc_debugfs.c media: usb: uvc: no need to check return value of debugfs_create functions 2020-09-26 10:15:17 +02:00
uvc_driver.c media: uvcvideo: Remove PLF device quirking 2024-06-17 23:21:12 +03:00
uvc_entity.c media: uvcvideo: Handle cameras with invalid descriptors 2023-01-15 23:45:08 +02:00
uvc_isight.c media: uvcvideo: Fix comment blocks style 2022-07-16 08:48:42 +01:00
uvc_metadata.c media: uvcvideo: Use dev->name for querycap() 2021-09-30 10:07:47 +02:00
uvc_queue.c media: uvcvideo: Fix comment blocks style 2022-07-16 08:48:42 +01:00
uvc_status.c media: uvcvideo: Fix race condition with usb_kill_urb 2023-01-15 23:45:15 +02:00
uvc_v4l2.c media: uvcvideo: Fix menu count handling for userspace XU mappings 2023-07-28 10:20:10 +02:00
uvc_video.c media: uvcvideo: Fix the bandwdith quirk on USB 3.x 2024-06-17 23:21:09 +03:00
uvcvideo.h media: uvcvideo: Remove mappings form uvc_device_info 2024-06-17 23:21:13 +03:00