diff options
Diffstat (limited to 'drivers/media/usb/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_v4l2.c | 10 |
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 5ba023be392..9c5cbcf1652 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; |