diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-10-21 16:07:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-25 08:40:37 -0200 |
commit | 3f02de275e5c4374ffeba554c7b9fa85ea13ecc5 (patch) | |
tree | 744860903ad98d498b3713c8bee5e39b3988c4f0 /drivers/media/usb/uvc/uvc_queue.c | |
parent | a11a03e50b73234444f7d439fb8ee6eaec3cffd1 (diff) | |
download | lwn-3f02de275e5c4374ffeba554c7b9fa85ea13ecc5.tar.gz lwn-3f02de275e5c4374ffeba554c7b9fa85ea13ecc5.zip |
[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_queue.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_queue.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 758247048ee1..708478f958e9 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -194,6 +194,13 @@ int uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type, return 0; } +void uvc_queue_release(struct uvc_video_queue *queue) +{ + mutex_lock(&queue->mutex); + vb2_queue_release(&queue->queue); + mutex_unlock(&queue->mutex); +} + /* ----------------------------------------------------------------------------- * V4L2 queue operations */ @@ -210,13 +217,6 @@ int uvc_alloc_buffers(struct uvc_video_queue *queue, return ret ? ret : rb->count; } -void uvc_free_buffers(struct uvc_video_queue *queue) -{ - mutex_lock(&queue->mutex); - vb2_queue_release(&queue->queue); - mutex_unlock(&queue->mutex); -} - int uvc_query_buffer(struct uvc_video_queue *queue, struct v4l2_buffer *buf) { int ret; |