From: Won Jung Date: Thu, 26 May 2016 13:19:35 +0000 (+0900) Subject: [COMMON] media: videobuf2-v4l2: fix bug for multiplane X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17b8c93b5b0fea456945bfe74f8b3de2f399fcd5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] media: videobuf2-v4l2: fix bug for multiplane In __fill_v4l2_buffer, q->is_multiplaner is used to check whether multiplane is requested. However, at this point, do not refer the condition because it is not determined yet. Therefore, using the macro, V4L2_TYPE_IS_MULTIPLANAR(), and type, the member value in struct v4l2_buffer, the condition (multiplane) is checked. Change-Id: I84ce7a39020de53423ba094dd10fc712deba8d1b Signed-off-by: Won Jung --- diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index dfb8fc4d6ade..466de62ad1e3 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -206,7 +206,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb) b->reserved2 = vbuf->reserved2; b->reserved = 0; - if (q->is_multiplanar) { + if (V4L2_TYPE_IS_MULTIPLANAR(b->type)) { /* * Fill in plane-related data if userspace provided an array * for it. The caller has already verified memory and size.