summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2015-09-15 03:49:44 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-01 07:47:33 -0300
commitd006a9791d53905109d3ba31c54c514326deeb6b (patch)
treed9c14600e383352a238580690698138f9c5dcd22 /drivers
parent00507a8d6a86973e55076ea21053fd8e786391eb (diff)
downloadop-kernel-dev-d006a9791d53905109d3ba31c54c514326deeb6b.zip
op-kernel-dev-d006a9791d53905109d3ba31c54c514326deeb6b.tar.gz
[media] vim2m: small cleanup: use assignment instead of memcpy
Use a type-safe assignment instead of memcpy. And it is easier to read as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/vim2m.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c
index 295fde5..d47cfba 100644
--- a/drivers/media/platform/vim2m.c
+++ b/drivers/media/platform/vim2m.c
@@ -233,12 +233,9 @@ static int device_process(struct vim2m_ctx *ctx,
out_vb->v4l2_buf.sequence = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_CAPTURE)->sequence++;
in_vb->v4l2_buf.sequence = q_data->sequence++;
- memcpy(&out_vb->v4l2_buf.timestamp,
- &in_vb->v4l2_buf.timestamp,
- sizeof(struct timeval));
+ out_vb->v4l2_buf.timestamp = in_vb->v4l2_buf.timestamp;
if (in_vb->v4l2_buf.flags & V4L2_BUF_FLAG_TIMECODE)
- memcpy(&out_vb->v4l2_buf.timecode, &in_vb->v4l2_buf.timecode,
- sizeof(struct v4l2_timecode));
+ out_vb->v4l2_buf.timecode = in_vb->v4l2_buf.timecode;
out_vb->v4l2_buf.field = in_vb->v4l2_buf.field;
out_vb->v4l2_buf.flags = in_vb->v4l2_buf.flags &
(V4L2_BUF_FLAG_TIMECODE |
OpenPOWER on IntegriCloud