[media] s5p-mfc: Optimize copy time stamp handling
authorKamil Debski <k.debski@samsung.com>
Wed, 24 Apr 2013 13:31:05 +0000 (10:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 25 Apr 2013 12:47:36 +0000 (09:47 -0300)
For the sake of simplicity and readability memcpy was replaced with
assignment.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c

index a5853fa5953105c3e03a00b5c7f5c5cf404ece61..01f9ae0dadb0e1564d873d49694806d3283fc2e7 100644 (file)
@@ -243,12 +243,10 @@ static void s5p_mfc_handle_frame_copy_time(struct s5p_mfc_ctx *ctx)
        src_buf = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list);
        list_for_each_entry(dst_buf, &ctx->dst_queue, list) {
                if (vb2_dma_contig_plane_dma_addr(dst_buf->b, 0) == dec_y_addr) {
-                       memcpy(&dst_buf->b->v4l2_buf.timecode,
-                               &src_buf->b->v4l2_buf.timecode,
-                               sizeof(struct v4l2_timecode));
-                       memcpy(&dst_buf->b->v4l2_buf.timestamp,
-                               &src_buf->b->v4l2_buf.timestamp,
-                               sizeof(struct timeval));
+                       dst_buf->b->v4l2_buf.timecode =
+                                               src_buf->b->v4l2_buf.timecode;
+                       dst_buf->b->v4l2_buf.timestamp =
+                                               src_buf->b->v4l2_buf.timestamp;
                        switch (frame_type) {
                        case S5P_FIMV_DECODE_FRAME_I_FRAME:
                                dst_buf->b->v4l2_buf.flags |=