diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-05 08:57:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-05 08:58:03 -0700 |
commit | e765bf84d59257d3c4f948fbce426ea3565e83ad (patch) | |
tree | e6c2fa13b21a2faf398c3c6ceba8fe5187e381d7 /drivers/media/video/vivi.c | |
parent | afd6bb387323154ff6554b52d333ec6efb8efe61 (diff) | |
parent | 6887a4131da3adaab011613776d865f4bcfb5678 (diff) |
Merge 3.5-rc5 into usb-next
This resolves a merge issue with the option.c USB serial driver.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media/video/vivi.c')
-rw-r--r-- | drivers/media/video/vivi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 0960d7f0d394..08c10240e70f 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c @@ -1149,10 +1149,14 @@ static ssize_t vivi_read(struct file *file, char __user *data, size_t count, loff_t *ppos) { struct vivi_dev *dev = video_drvdata(file); + int err; dprintk(dev, 1, "read called\n"); - return vb2_read(&dev->vb_vidq, data, count, ppos, + mutex_lock(&dev->mutex); + err = vb2_read(&dev->vb_vidq, data, count, ppos, file->f_flags & O_NONBLOCK); + mutex_unlock(&dev->mutex); + return err; } static unsigned int |