summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/usb/uvc/uvc_v4l2.c
diff options
context:
space:
mode:
authorJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-11 10:41:07 +0300
committerJosé Pekkarinen <jose.pekkarinen@nokia.com>2016-04-13 08:17:18 +0300
commite09b41010ba33a20a87472ee821fa407a5b8da36 (patch)
treed10dc367189862e7ca5c592f033dc3726e1df4e3 /kernel/drivers/media/usb/uvc/uvc_v4l2.c
parentf93b97fd65072de626c074dbe099a1fff05ce060 (diff)
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
are taken from kernel.org, and rt patch from the rt wiki download page. During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com>
Diffstat (limited to 'kernel/drivers/media/usb/uvc/uvc_v4l2.c')
-rw-r--r--kernel/drivers/media/usb/uvc/uvc_v4l2.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/kernel/drivers/media/usb/uvc/uvc_v4l2.c b/kernel/drivers/media/usb/uvc/uvc_v4l2.c
index c4b1ac675..2764f4360 100644
--- a/kernel/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/kernel/drivers/media/usb/uvc/uvc_v4l2.c
@@ -483,9 +483,6 @@ static int uvc_v4l2_open(struct file *file)
uvc_trace(UVC_TRACE_CALLS, "uvc_v4l2_open\n");
stream = video_drvdata(file);
- if (stream->dev->state & UVC_DEV_DISCONNECTED)
- return -ENODEV;
-
ret = usb_autopm_get_interface(stream->dev->intf);
if (ret < 0)
return ret;
@@ -723,6 +720,18 @@ static int uvc_ioctl_qbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
return uvc_queue_buffer(&stream->queue, buf);
}
+static int uvc_ioctl_expbuf(struct file *file, void *fh,
+ struct v4l2_exportbuffer *exp)
+{
+ struct uvc_fh *handle = fh;
+ struct uvc_streaming *stream = handle->stream;
+
+ if (!uvc_has_privileges(handle))
+ return -EBUSY;
+
+ return uvc_export_buffer(&stream->queue, exp);
+}
+
static int uvc_ioctl_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf)
{
struct uvc_fh *handle = fh;
@@ -1478,6 +1487,7 @@ const struct v4l2_ioctl_ops uvc_ioctl_ops = {
.vidioc_reqbufs = uvc_ioctl_reqbufs,
.vidioc_querybuf = uvc_ioctl_querybuf,
.vidioc_qbuf = uvc_ioctl_qbuf,
+ .vidioc_expbuf = uvc_ioctl_expbuf,
.vidioc_dqbuf = uvc_ioctl_dqbuf,
.vidioc_create_bufs = uvc_ioctl_create_bufs,
.vidioc_streamon = uvc_ioctl_streamon,