[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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
1b7f9c989e
commit
0da4ab984b
@@ -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;
|
||||
|
Reference in New Issue
Block a user