diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-10-21 15:07:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-25 05:40:37 -0500 |
commit | 3f02de275e5c4374ffeba554c7b9fa85ea13ecc5 (patch) | |
tree | 744860903ad98d498b3713c8bee5e39b3988c4f0 /drivers/media/usb/uvc/uvc_v4l2.c | |
parent | a11a03e50b73234444f7d439fb8ee6eaec3cffd1 (diff) |
[media] uvcvideo: Don't stop the stream twice at file handle release
When releasing the file handle the driver calls the vb2_queue_release
which turns the stream off. There's thus no need to turn the stream off
explicitly beforehand.
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c index 4619fd6b0494..1b6b6db30d98 100644 --- a/drivers/media/usb/uvc/uvc_v4l2.c +++ b/drivers/media/usb/uvc/uvc_v4l2.c | |||
@@ -530,10 +530,8 @@ static int uvc_v4l2_release(struct file *file) | |||
530 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n"); | 530 | uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_release\n"); |
531 | 531 | ||
532 | /* Only free resources if this is a privileged handle. */ | 532 | /* Only free resources if this is a privileged handle. */ |
533 | if (uvc_has_privileges(handle)) { | 533 | if (uvc_has_privileges(handle)) |
534 | uvc_queue_enable(&stream->queue, 0); | 534 | uvc_queue_release(&stream->queue); |
535 | uvc_free_buffers(&stream->queue); | ||
536 | } | ||
537 | 535 | ||
538 | /* Release the file handle. */ | 536 | /* Release the file handle. */ |
539 | uvc_dismiss_privileges(handle); | 537 | uvc_dismiss_privileges(handle); |