upstream: [media] coda: use vb2_set_plane_payload instead of setting v4l2_planes...
authorPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 21 Jun 2013 06:55:27 +0000 (03:55 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:26:50 +0000 (14:26 +0900)
As stated in the vb2_buffer documentation, drivers should not directly fill
in v4l2_planes[0].bytesused, but should use the vb2_set_plane_payload()
function instead. No functional changes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/coda.c

index 0b47095..f39bd3d 100644 (file)
@@ -2758,12 +2758,12 @@ static void coda_finish_encode(struct coda_ctx *ctx)
 
        /* Calculate bytesused field */
        if (dst_buf->v4l2_buf.sequence == 0) {
-               dst_buf->v4l2_planes[0].bytesused = (wr_ptr - start_ptr) +
-                                               ctx->vpu_header_size[0] +
-                                               ctx->vpu_header_size[1] +
-                                               ctx->vpu_header_size[2];
+               vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr +
+                                       ctx->vpu_header_size[0] +
+                                       ctx->vpu_header_size[1] +
+                                       ctx->vpu_header_size[2]);
        } else {
-               dst_buf->v4l2_planes[0].bytesused = (wr_ptr - start_ptr);
+               vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr);
        }
 
        v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev, "frame size = %u\n",