summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos-gsc/gsc-m2m.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2020-06-24 21:28:00 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-07-19 08:13:24 +0200
commitb3ab1c6058fad8cd5726f24e9ed9053e43bb2af4 (patch)
treefb02c7980fd3ddfd76ee15c39d8652ce8046619c /drivers/media/platform/exynos-gsc/gsc-m2m.c
parentd6129d36b305e9943bc6af0e4f0f7f6a77ded9b0 (diff)
downloadlinux-next-b3ab1c6058fad8cd5726f24e9ed9053e43bb2af4.tar.gz
media: Add V4L2_TYPE_IS_CAPTURE helper
It's all too easy to get confused by the V4L2_TYPE_IS_OUTPUT macro, when it's used as !V4L2_TYPE_IS_OUTPUT. Reduce the risk of confusion with macro to explicitly check for the CAPTURE queue type case. This change does not affect functionality, and it's only intended to make the code more readable. Suggested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: checkpatch: align with parenthesis] Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/exynos-gsc/gsc-m2m.c')
-rw-r--r--drivers/media/platform/exynos-gsc/gsc-m2m.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c b/drivers/media/platform/exynos-gsc/gsc-m2m.c
index e2c162635f72..27a3c92c73bc 100644
--- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
+++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
@@ -255,7 +255,7 @@ static int gsc_m2m_buf_prepare(struct vb2_buffer *vb)
if (IS_ERR(frame))
return PTR_ERR(frame);
- if (!V4L2_TYPE_IS_OUTPUT(vb->vb2_queue->type)) {
+ if (V4L2_TYPE_IS_CAPTURE(vb->vb2_queue->type)) {
for (i = 0; i < frame->fmt->num_planes; i++)
vb2_set_plane_payload(vb, i, frame->payload[i]);
}