linux/drivers/media/usb/uvc
Ricardo Ribalda 44cdba4130 media: uvcvideo: Return -EACCES for Wrong state error
Error 2 is defined by UVC as:

  Wrong State: The device is in a state that disallows the specific
  request. The device will remain in this state until a specific action
  from the host or the user is completed.

This is documented as happening when attempting to set the value of a
manual control when the device is in auto mode. While V4L2 allows this,
the closest error code defined by VIDIOC_S_CTRL is EACCES:

  EACCES: Attempt to set a read-only control or to get a write-only
  control. Or if there is an attempt to set an inactive control and the
  driver is not capable of caching the new value until the control is
  active again.

Replace EILSEQ with EACCES.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Suggested-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2023-01-15 23:45:12 +02:00
..
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile
uvc_ctrl.c media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() 2023-01-15 23:45:11 +02: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: Factor out usb_string() calls 2023-01-15 23:45:11 +02: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: Remove void casting for the status endpoint 2023-01-15 23:45:10 +02:00
uvc_v4l2.c media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() 2023-01-15 23:45:11 +02:00
uvc_video.c media: uvcvideo: Return -EACCES for Wrong state error 2023-01-15 23:45:12 +02:00
uvcvideo.h media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible() 2023-01-15 23:45:11 +02:00