TencentOS-kernel/drivers/media
Hans de Goede 1e5b1ea419 media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect
commit 93df48d37c3f03886d84831992926333e7810640 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>
2021-03-16 16:39:56 +08:00
..
cec cec-api: prevent leaking memory through hole in structure 2021-03-16 16:34:50 +08:00
common Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
dvb-core media: dvbdev: Fix tuner->demod media controller link 2021-03-16 16:29:21 +08:00
dvb-frontends media: tda10071: fix unsigned sign extension overflow 2021-03-16 16:37:00 +08:00
firewire media: firewire: fix memory leak 2021-03-16 16:39:12 +08:00
i2c media: imx274: fix frame interval handling 2021-03-16 16:39:44 +08:00
mc media: mc-device.c: fix memleak in media_device_register_entity 2021-03-16 16:36:31 +08:00
mmc Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
pci media: tw5864: check status of tw5864_frameinterval_get 2021-03-16 16:39:44 +08:00
platform media: platform: Improve queue set up flow for bug fixing 2021-03-16 16:39:44 +08:00
radio Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
rc media: ati_remote: sanity check for both endpoints 2021-03-16 16:39:12 +08:00
spi Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tuners media: tuner-simple: fix regression in simple_set_radio_freq 2021-03-16 16:38:24 +08:00
usb media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect 2021-03-16 16:39:56 +08:00
v4l2-core Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00