summaryrefslogtreecommitdiff
path: root/drivers/media/usb/go7007
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-12-08 08:52:06 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-02-06 09:01:05 +0100
commit25e7b6c00dbf5cd319bc8bee1588f67880e45ee0 (patch)
tree8c3e16cc4cab8f69927a4889475889aea986a19b /drivers/media/usb/go7007
parentc43784c856483dded7956175b5786e27af6d87f1 (diff)
media: go7007: don't modify q->streaming
The streaming state is maintained by the vb2 core, so drivers must never change it themselves. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/usb/go7007')
-rw-r--r--drivers/media/usb/go7007/go7007-v4l2.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c
index b2edc4deaca3..13256565b034 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -404,16 +404,13 @@ static int go7007_start_streaming(struct vb2_queue *q, unsigned int count)
go->next_seq = 0;
go->active_buf = NULL;
go->modet_event_status = 0;
- q->streaming = 1;
if (go7007_start_encoder(go) < 0)
ret = -EIO;
else
ret = 0;
mutex_unlock(&go->hw_lock);
- if (ret) {
- q->streaming = 0;
+ if (ret)
return ret;
- }
call_all(&go->v4l2_dev, video, s_stream, 1);
v4l2_ctrl_grab(go->mpeg_video_gop_size, true);
v4l2_ctrl_grab(go->mpeg_video_gop_closure, true);
@@ -430,7 +427,6 @@ static void go7007_stop_streaming(struct vb2_queue *q)
struct go7007 *go = vb2_get_drv_priv(q);
unsigned long flags;
- q->streaming = 0;
go7007_stream_stop(go);
mutex_lock(&go->hw_lock);
go7007_reset_encoder(go);