V4L/DVB (13150): uvcvideo: Don't acquire privileges in VIDIOC_TRY_FMT
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 2 Sep 2009 06:09:02 +0000 (03:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Dec 2009 20:40:35 +0000 (18:40 -0200)
The VIDIOC_TRY_FMT ioctl doesn't interfere with video streaming and thus
should succeed on an unprivileged file handle.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/uvc/uvc_v4l2.c

index a2bdd806efab1e8244dc551c3bf2d0fcf4d0ab7d..7c555712411a75c16eca39616c86bf5e401427f3 100644 (file)
@@ -371,7 +371,6 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream,
  * - VIDIOC_S_INPUT
  * - VIDIOC_S_PARM
  * - VIDIOC_S_FMT
- * - VIDIOC_TRY_FMT
  * - VIDIOC_REQBUFS
  */
 static int uvc_acquire_privileges(struct uvc_fh *handle)
@@ -731,9 +730,6 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
        {
                struct uvc_streaming_control probe;
 
-               if ((ret = uvc_acquire_privileges(handle)) < 0)
-                       return ret;
-
                return uvc_v4l2_try_format(stream, arg, &probe, NULL, NULL);
        }