summaryrefslogtreecommitdiffstats
path: root/drivers/media/parport/bw-qcam.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-03-04 11:34:49 +0100
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-11 10:56:39 +0100
commit9c0863b1cc485f2bacac0675c68b73e5341cfd26 (patch)
treeadd2ca56deca15ea064d34966edfa21dcef40fe3 /drivers/media/parport/bw-qcam.c
parent[media] pwc: do not decompress the image unless the state is DONE (diff)
downloadlinux-9c0863b1cc485f2bacac0675c68b73e5341cfd26.tar.xz
linux-9c0863b1cc485f2bacac0675c68b73e5341cfd26.zip
[media] vb2: call buf_finish from __queue_cancel
If a queue was canceled, then the buf_finish op was never called for the pending buffers. So add this call to queue_cancel. Before calling buf_finish set the buffer state to PREPARED, which is the correct state. That way the states DONE and ERROR will only be seen in buf_finish if streaming is in progress. Since buf_finish can now be called from non-streaming state we need to adapt the handful of drivers that actually need to know this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/parport/bw-qcam.c')
-rw-r--r--drivers/media/parport/bw-qcam.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/parport/bw-qcam.c b/drivers/media/parport/bw-qcam.c
index cf2db63da3b1..8a0e84c7d495 100644
--- a/drivers/media/parport/bw-qcam.c
+++ b/drivers/media/parport/bw-qcam.c
@@ -674,6 +674,9 @@ static void buffer_finish(struct vb2_buffer *vb)
int size = vb->vb2_queue->plane_sizes[0];
int len;
+ if (!vb2_is_streaming(vb->vb2_queue))
+ return;
+
mutex_lock(&qcam->lock);
parport_claim_or_block(qcam->pdev);