aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/uvc/uvc_queue.c
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2014-01-29 11:13:52 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-28 11:24:32 -0500
commit6e9179e2af61f93e6416c3dd11aca46dcd5a68e8 (patch)
tree9a4e52f8018be2e1306e8f30e45af016895ffe0c /drivers/media/usb/uvc/uvc_queue.c
parentbddb9d0e97f20dfd614d3dd56043418766703936 (diff)
[media] uvcvideo: Enable VIDIOC_CREATE_BUFS
This patch enables the ioctl to create additional buffers on the videobuf2 capture queue. [laurent.pinchart@ideasonboard.com: Acquire privileges instead of just checking them in VIDIOC_CREATE_BUFS implementation] Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_queue.c')
-rw-r--r--drivers/media/usb/uvc/uvc_queue.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c
index d46dd7011ed3..ff7be9702486 100644
--- a/drivers/media/usb/uvc/uvc_queue.c
+++ b/drivers/media/usb/uvc/uvc_queue.c
@@ -198,6 +198,18 @@ int uvc_query_buffer(struct uvc_video_queue *queue, struct v4l2_buffer *buf)
198 return ret; 198 return ret;
199} 199}
200 200
201int uvc_create_buffers(struct uvc_video_queue *queue,
202 struct v4l2_create_buffers *cb)
203{
204 int ret;
205
206 mutex_lock(&queue->mutex);
207 ret = vb2_create_bufs(&queue->queue, cb);
208 mutex_unlock(&queue->mutex);
209
210 return ret;
211}
212
201int uvc_queue_buffer(struct uvc_video_queue *queue, struct v4l2_buffer *buf) 213int uvc_queue_buffer(struct uvc_video_queue *queue, struct v4l2_buffer *buf)
202{ 214{
203 int ret; 215 int ret;