Commit 25e7b6c0 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent c43784c8
...@@ -404,16 +404,13 @@ static int go7007_start_streaming(struct vb2_queue *q, unsigned int count) ...@@ -404,16 +404,13 @@ static int go7007_start_streaming(struct vb2_queue *q, unsigned int count)
go->next_seq = 0; go->next_seq = 0;
go->active_buf = NULL; go->active_buf = NULL;
go->modet_event_status = 0; go->modet_event_status = 0;
q->streaming = 1;
if (go7007_start_encoder(go) < 0) if (go7007_start_encoder(go) < 0)
ret = -EIO; ret = -EIO;
else else
ret = 0; ret = 0;
mutex_unlock(&go->hw_lock); mutex_unlock(&go->hw_lock);
if (ret) { if (ret)
q->streaming = 0;
return ret; return ret;
}
call_all(&go->v4l2_dev, video, s_stream, 1); 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_size, true);
v4l2_ctrl_grab(go->mpeg_video_gop_closure, true); v4l2_ctrl_grab(go->mpeg_video_gop_closure, true);
...@@ -430,7 +427,6 @@ static void go7007_stop_streaming(struct vb2_queue *q) ...@@ -430,7 +427,6 @@ static void go7007_stop_streaming(struct vb2_queue *q)
struct go7007 *go = vb2_get_drv_priv(q); struct go7007 *go = vb2_get_drv_priv(q);
unsigned long flags; unsigned long flags;
q->streaming = 0;
go7007_stream_stop(go); go7007_stream_stop(go);
mutex_lock(&go->hw_lock); mutex_lock(&go->hw_lock);
go7007_reset_encoder(go); go7007_reset_encoder(go);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment