提交 e91b6006 编写于 作者: M Markus Elfring 提交者: Mauro Carvalho Chehab

[media] DaVinci-VPFE-Capture: Replace a memcpy() call by an assignment in vpfe_enum_input()

Use a direct assignment for an array element which can be set over the
pointer variable "inp" instead of calling the function "memcpy" here.
Suggested-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 2eaa68f3
......@@ -1086,7 +1086,7 @@ static int vpfe_enum_input(struct file *file, void *priv,
return -EINVAL;
}
sdinfo = &vpfe_dev->cfg->sub_devs[subdev];
memcpy(inp, &sdinfo->inputs[index], sizeof(struct v4l2_input));
*inp = sdinfo->inputs[index];
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册