]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.4.172/media-em28xx-fix-misplaced-reset-of-dev-v4l-field_count.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.4.172 / media-em28xx-fix-misplaced-reset-of-dev-v4l-field_count.patch
CommitLineData
69edb815
GKH
1From ben@decadent.org.uk Fri Jan 18 17:00:31 2019
2From: Ben Hutchings <ben@decadent.org.uk>
3Date: Thu, 17 Jan 2019 00:22:48 +0000
4Subject: media: em28xx: Fix misplaced reset of dev->v4l::field_count
5To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6Cc: stable@vger.kernel.org, Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
7Message-ID: <20190117002247.6w6az3v5unwwq57b@decadent.org.uk>
8Content-Disposition: inline
9
10From: Ben Hutchings <ben@decadent.org.uk>
11
12The backport of commit afeaade90db4 "media: em28xx: make
13v4l2-compliance happier by starting sequence on zero" added a
14reset on em28xx_v4l2::field_count to em28xx_ctrl_notify(),
15but it should be done in em28xx_start_analog_streaming().
16
17Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
19Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21---
22 drivers/media/usb/em28xx/em28xx-video.c | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
24
25--- a/drivers/media/usb/em28xx/em28xx-video.c
26+++ b/drivers/media/usb/em28xx/em28xx-video.c
27@@ -930,6 +930,8 @@ int em28xx_start_analog_streaming(struct
28
29 em28xx_videodbg("%s\n", __func__);
30
31+ dev->v4l2->field_count = 0;
32+
33 /* Make sure streaming is not already in progress for this type
34 of filehandle (e.g. video, vbi) */
35 rc = res_get(dev, vq->type);
36@@ -1149,8 +1151,6 @@ static void em28xx_ctrl_notify(struct v4
37 {
38 struct em28xx *dev = priv;
39
40- dev->v4l2->field_count = 0;
41-
42 /*
43 * In the case of non-AC97 volume controls, we still need
44 * to do some setups at em28xx, in order to mute/unmute