summaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorHans Verkuil2019-02-04 11:11:32 +0100
committerMauro Carvalho Chehab2019-02-18 20:43:28 +0100
commitcfc7740835d09b98a304a4793c93b6074c04379e (patch)
treede0cd3d502ac55d069c41031e87373bfe015ecaa /drivers/media/common
parentmedia: imx-pxp: Start using the format VUYA32 instead of YUV32 (v2) (diff)
downloadkernel-qcow2-linux-cfc7740835d09b98a304a4793c93b6074c04379e.tar.gz
kernel-qcow2-linux-cfc7740835d09b98a304a4793c93b6074c04379e.tar.xz
kernel-qcow2-linux-cfc7740835d09b98a304a4793c93b6074c04379e.zip
media: vb2: replace bool by bitfield in vb2_buffer
The bool type is not recommended for use in structs, so replace these by bitfields. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/videobuf2/videobuf2-core.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index 34cc87ca8d59..b4457edc3245 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -934,7 +934,7 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
/* sync buffers */
for (plane = 0; plane < vb->num_planes; ++plane)
call_void_memop(vb, finish, vb->planes[plane].mem_priv);
- vb->synced = false;
+ vb->synced = 0;
}
spin_lock_irqsave(&q->done_lock, flags);
@@ -1313,8 +1313,8 @@ static int __buf_prepare(struct vb2_buffer *vb)
for (plane = 0; plane < vb->num_planes; ++plane)
call_void_memop(vb, prepare, vb->planes[plane].mem_priv);
- vb->synced = true;
- vb->prepared = true;
+ vb->synced = 1;
+ vb->prepared = 1;
vb->state = orig_state;
return 0;
@@ -1802,7 +1802,7 @@ int vb2_core_dqbuf(struct vb2_queue *q, unsigned int *pindex, void *pb,
}
call_void_vb_qop(vb, buf_finish, vb);
- vb->prepared = false;
+ vb->prepared = 0;
if (pindex)
*pindex = vb->index;
@@ -1926,12 +1926,12 @@ static void __vb2_queue_cancel(struct vb2_queue *q)
for (plane = 0; plane < vb->num_planes; ++plane)
call_void_memop(vb, finish,
vb->planes[plane].mem_priv);
- vb->synced = false;
+ vb->synced = 0;
}
if (vb->prepared) {
call_void_vb_qop(vb, buf_finish, vb);
- vb->prepared = false;
+ vb->prepared = 0;
}
__vb2_dqbuf(vb);