diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 00:37:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 00:37:36 -0300 |
commit | 52f9a4e5b2eae78dceb70971ee7df8e1db330239 (patch) | |
tree | 56a3b69004fa80da2a2d9afb6498b79db9fea434 /linux/drivers/media/video/uvc/uvc_queue.c | |
parent | 6e323483b126ac7589cadb5bad2f666cf4b7eb9d (diff) | |
parent | a2aa04e72cd03545056bd4a9a7cdd6b340908ca2 (diff) | |
download | mediapointer-dvb-s2-52f9a4e5b2eae78dceb70971ee7df8e1db330239.tar.gz mediapointer-dvb-s2-52f9a4e5b2eae78dceb70971ee7df8e1db330239.tar.bz2 |
merge: http://kernellabs.com/hg/~dheitmueller/em28xx-no-audio
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/uvc/uvc_queue.c')
-rw-r--r-- | linux/drivers/media/video/uvc/uvc_queue.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_queue.c b/linux/drivers/media/video/uvc/uvc_queue.c index 0155752e4..f854698c4 100644 --- a/linux/drivers/media/video/uvc/uvc_queue.c +++ b/linux/drivers/media/video/uvc/uvc_queue.c @@ -172,6 +172,20 @@ int uvc_free_buffers(struct uvc_video_queue *queue) return 0; } +/* + * Check if buffers have been allocated. + */ +int uvc_queue_allocated(struct uvc_video_queue *queue) +{ + int allocated; + + mutex_lock(&queue->mutex); + allocated = queue->count != 0; + mutex_unlock(&queue->mutex); + + return allocated; +} + static void __uvc_query_buffer(struct uvc_buffer *buf, struct v4l2_buffer *v4l2_buf) { |