OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af03891
)
[media] Fix vivi regression
author
Hans Verkuil
<hverkuil@xs4all.nl>
Wed, 6 Jun 2012 05:17:16 +0000
(
02:17
-0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Mon, 11 Jun 2012 18:16:29 +0000
(15:16 -0300)
This patch fixes a regression introduced by commit
5126f2590bee412e3053de851cb07f531e4be36a
:
[media] v4l2-dev: add flag to have the core lock all file operations
I forgot to add the locks to the vivi read operation.
Regards,
Hans
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/vivi.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/vivi.c
b/drivers/media/video/vivi.c
index
0960d7f
..
08c1024
100644
(file)
--- 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