linux/drivers/media/usb/uvc
Hans de Goede 2f3cb993a6 media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect
commit 93df48d37c upstream.

uvc_ctrl_add_info() calls uvc_ctrl_get_flags() which will override
the fixed-up flags set by uvc_ctrl_fixup_xu_info().

uvc_ctrl_init_xu_ctrl() already calls uvc_ctrl_get_flags() before
calling uvc_ctrl_add_info(), so the uvc_ctrl_get_flags() call in
uvc_ctrl_add_info() is not necessary for xu ctrls.

This commit moves the uvc_ctrl_get_flags() call for normal controls
from uvc_ctrl_add_info() to uvc_ctrl_init_ctrl(), so that we no longer
call uvc_ctrl_get_flags() twice for xu controls and so that we no longer
override the fixed-up flags set by uvc_ctrl_fixup_xu_info().

This fixes the xu motor controls not working properly on a Logitech
046d:08cc, and presumably also on the other Logitech models which have
a quirk for this in the uvc_ctrl_fixup_xu_info() function.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-05 11:43:24 +01:00
..
Kconfig
Makefile
uvc_ctrl.c media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect 2020-11-05 11:43:24 +01:00
uvc_debugfs.c
uvc_driver.c
uvc_entity.c media: uvcvideo: Set media controller entity functions 2020-10-29 09:57:31 +01:00
uvc_isight.c
uvc_metadata.c
uvc_queue.c
uvc_status.c
uvc_v4l2.c media: uvcvideo: Ensure all probed info is returned to v4l2 2020-10-29 09:58:03 +01:00
uvc_video.c
uvcvideo.h