diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0016-gspca-core-Fix-buffers-staying-in-queued-state-after.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0016-gspca-core-Fix-buffers-staying-in-queued-state-after.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0016-gspca-core-Fix-buffers-staying-in-queued-state-after.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0016-gspca-core-Fix-buffers-staying-in-queued-state-after.patch new file mode 100644 index 00000000..152c0d51 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.22/0016-gspca-core-Fix-buffers-staying-in-queued-state-after.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From f9f47b15a0eb3d8ae86f5d034fd8924ab258a4d2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hans de Goede <hdegoede@redhat.com> | ||
3 | Date: Tue, 22 May 2012 11:24:05 -0300 | ||
4 | Subject: [PATCH 16/46] gspca-core: Fix buffers staying in queued state after | ||
5 | a stream_off | ||
6 | |||
7 | commit af05ef01e9cde84620c6855a8d8ab9c8a1db9009 upstream. | ||
8 | |||
9 | This fixes a regression introduced by commit f7059ea and should be | ||
10 | backported to all supported stable kernels which have this commit. | ||
11 | |||
12 | Signed-off-by: Hans de Goede <hdegoede@redhat.com> | ||
13 | Tested-by: Antonio Ospite <ospite@studenti.unina.it> | ||
14 | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ||
15 | [bwh: Backported to 3.2: adjust context] | ||
16 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
17 | --- | ||
18 | drivers/media/video/gspca/gspca.c | 4 +++- | ||
19 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c | ||
22 | index 2ca10df..981501f 100644 | ||
23 | --- a/drivers/media/video/gspca/gspca.c | ||
24 | +++ b/drivers/media/video/gspca/gspca.c | ||
25 | @@ -1697,7 +1697,7 @@ static int vidioc_streamoff(struct file *file, void *priv, | ||
26 | enum v4l2_buf_type buf_type) | ||
27 | { | ||
28 | struct gspca_dev *gspca_dev = priv; | ||
29 | - int ret; | ||
30 | + int i, ret; | ||
31 | |||
32 | if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) | ||
33 | return -EINVAL; | ||
34 | @@ -1728,6 +1728,8 @@ static int vidioc_streamoff(struct file *file, void *priv, | ||
35 | wake_up_interruptible(&gspca_dev->wq); | ||
36 | |||
37 | /* empty the transfer queues */ | ||
38 | + for (i = 0; i < gspca_dev->nframes; i++) | ||
39 | + gspca_dev->frame[i].v4l2_buf.flags &= ~BUF_ALL_FLAGS; | ||
40 | atomic_set(&gspca_dev->fr_q, 0); | ||
41 | atomic_set(&gspca_dev->fr_i, 0); | ||
42 | gspca_dev->fr_o = 0; | ||
43 | -- | ||
44 | 1.7.10 | ||
45 | |||