summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_v4l2.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-10-21 16:19:04 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 08:42:01 -0200
commit0da4ab984b1753b160b5fa840ae98b87228ac3dc (patch)
tree0e729c8d972d1e6ce63f32e903b2425ff382645f /drivers/media/usb/uvc/uvc_v4l2.c
parent1b7f9c989ee7684dc70f0a75a037ecb1d437d3c2 (diff)
downloadblackbird-obmc-linux-0da4ab984b1753b160b5fa840ae98b87228ac3dc.tar.gz
blackbird-obmc-linux-0da4ab984b1753b160b5fa840ae98b87228ac3dc.zip
[media] uvcvideo: Rename and split uvc_queue_enable to uvc_queue_stream(on|off)
This brings the function name in line with the V4L2 API terminology and allows removing the duplicate queue type check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_v4l2.c')
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 5ba023be3926..9c5cbcf16529 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -757,14 +757,11 @@ static int uvc_ioctl_streamon(struct file *file, void *fh,
struct uvc_streaming *stream = handle->stream;
int ret;
- if (type != stream->type)
- return -EINVAL;
-
if (!uvc_has_privileges(handle))
return -EBUSY;
mutex_lock(&stream->mutex);
- ret = uvc_queue_enable(&stream->queue, 1);
+ ret = uvc_queue_streamon(&stream->queue, type);
mutex_unlock(&stream->mutex);
return ret;
@@ -776,14 +773,11 @@ static int uvc_ioctl_streamoff(struct file *file, void *fh,
struct uvc_fh *handle = fh;
struct uvc_streaming *stream = handle->stream;
- if (type != stream->type)
- return -EINVAL;
-
if (!uvc_has_privileges(handle))
return -EBUSY;
mutex_lock(&stream->mutex);
- uvc_queue_enable(&stream->queue, 0);
+ uvc_queue_streamoff(&stream->queue, type);
mutex_unlock(&stream->mutex);
return 0;
OpenPOWER on IntegriCloud