diff options
author | Kamil Debski <k.debski@samsung.com> | 2013-04-24 09:31:05 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-25 08:47:36 -0400 |
commit | 56006017316cea85cedd22a5f2f7aa31e77a40df (patch) | |
tree | 23a88c9f0db23fc1fab432d822293316ee4e994f | |
parent | aca326aeab43219ba8120a0a2976baa359b9a38d (diff) |
[media] s5p-mfc: Optimize copy time stamp handling
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>
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index a5853fa59531..01f9ae0dadb0 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -243,12 +243,10 @@ static void s5p_mfc_handle_frame_copy_time(struct s5p_mfc_ctx *ctx) | |||
243 | src_buf = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list); | 243 | src_buf = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list); |
244 | list_for_each_entry(dst_buf, &ctx->dst_queue, list) { | 244 | list_for_each_entry(dst_buf, &ctx->dst_queue, list) { |
245 | if (vb2_dma_contig_plane_dma_addr(dst_buf->b, 0) == dec_y_addr) { | 245 | if (vb2_dma_contig_plane_dma_addr(dst_buf->b, 0) == dec_y_addr) { |
246 | memcpy(&dst_buf->b->v4l2_buf.timecode, | 246 | dst_buf->b->v4l2_buf.timecode = |
247 | &src_buf->b->v4l2_buf.timecode, | 247 | src_buf->b->v4l2_buf.timecode; |
248 | sizeof(struct v4l2_timecode)); | 248 | dst_buf->b->v4l2_buf.timestamp = |
249 | memcpy(&dst_buf->b->v4l2_buf.timestamp, | 249 | src_buf->b->v4l2_buf.timestamp; |
250 | &src_buf->b->v4l2_buf.timestamp, | ||
251 | sizeof(struct timeval)); | ||
252 | switch (frame_type) { | 250 | switch (frame_type) { |
253 | case S5P_FIMV_DECODE_FRAME_I_FRAME: | 251 | case S5P_FIMV_DECODE_FRAME_I_FRAME: |
254 | dst_buf->b->v4l2_buf.flags |= | 252 | dst_buf->b->v4l2_buf.flags |= |