linux/drivers/media/usb/uvc
Kieran Bingham 0dc68cabdb media: uvcvideo: Prevent setting unavailable flags
The addition of an extra operation to use the GET_INFO command
overwrites all existing flags from the uvc_ctrls table. This includes
setting all controls as supporting GET_MIN, GET_MAX, GET_RES, and
GET_DEF regardless of whether they do or not.

Move the initialisation of these control capabilities directly to the
uvc_ctrl_fill_xu_info() call where they were originally located in that
use case, and ensure that the new functionality in uvc_ctrl_get_flags()
will only set flags based on their reported capability from the GET_INFO
call.

Fixes: 859086ae36 ("media: uvcvideo: Apply flags from device to actual properties")

Cc: stable@vger.kernel.org
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-06-05 09:33:51 -04:00
..
Kconfig [media] uvc: Depend on VIDEO_V4L2 2013-06-24 22:54:40 -03:00
Makefile media: uvcvideo: Add a metadata device node 2018-01-04 06:41:47 -05:00
uvc_ctrl.c media: uvcvideo: Prevent setting unavailable flags 2018-06-05 09:33:51 -04:00
uvc_debugfs.c [media] uvcvideo: Change result code of debugfs_init to void 2017-01-31 10:56:48 -02:00
uvc_driver.c media: uvcvideo: Fix driver reference counting 2018-05-28 16:49:47 -04:00
uvc_entity.c media: uvcvideo: Constify video_subdev structures 2017-08-20 08:10:24 -04:00
uvc_isight.c media: uvcvideo: Use internal kernel integer types 2018-02-23 02:20:52 -05:00
uvc_metadata.c media: uvcvideo: Add a metadata device node 2018-01-04 06:41:47 -05:00
uvc_queue.c media updates for v4.16-rc1 2018-02-06 11:27:48 -08:00
uvc_status.c media: uvcvideo: Use internal kernel integer types 2018-02-23 02:20:52 -05:00
uvc_v4l2.c media: uvc: to the right check at uvc_ioctl_enum_framesizes() 2018-03-23 08:37:27 -04:00
uvc_video.c media: uvcvideo: Support realtek's UVC 1.5 device 2018-05-28 16:59:55 -04:00
uvcvideo.h media: uvcvideo: Use internal kernel integer types 2018-02-23 02:20:52 -05:00