diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/videobuf2-core.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 8c6f04bc4d89..6698c77e0f64 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c | |||
@@ -1111,6 +1111,7 @@ EXPORT_SYMBOL_GPL(vb2_dqbuf); | |||
1111 | int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type) | 1111 | int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type) |
1112 | { | 1112 | { |
1113 | struct vb2_buffer *vb; | 1113 | struct vb2_buffer *vb; |
1114 | int ret; | ||
1114 | 1115 | ||
1115 | if (q->fileio) { | 1116 | if (q->fileio) { |
1116 | dprintk(1, "streamon: file io in progress\n"); | 1117 | dprintk(1, "streamon: file io in progress\n"); |
@@ -1138,12 +1139,16 @@ int vb2_streamon(struct vb2_queue *q, enum v4l2_buf_type type) | |||
1138 | } | 1139 | } |
1139 | } | 1140 | } |
1140 | 1141 | ||
1141 | q->streaming = 1; | ||
1142 | |||
1143 | /* | 1142 | /* |
1144 | * Let driver notice that streaming state has been enabled. | 1143 | * Let driver notice that streaming state has been enabled. |
1145 | */ | 1144 | */ |
1146 | call_qop(q, start_streaming, q); | 1145 | ret = call_qop(q, start_streaming, q); |
1146 | if (ret) { | ||
1147 | dprintk(1, "streamon: driver refused to start streaming\n"); | ||
1148 | return ret; | ||
1149 | } | ||
1150 | |||
1151 | q->streaming = 1; | ||
1147 | 1152 | ||
1148 | /* | 1153 | /* |
1149 | * If any buffers were queued before streamon, | 1154 | * If any buffers were queued before streamon, |