]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] DaVinci-VPFE-Capture: Replace a memcpy() call by an assignment in vpfe_enum_i...
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 6 Nov 2016 20:54:38 +0000 (18:54 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 16 Nov 2016 17:25:06 +0000 (15:25 -0200)
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: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/davinci/vpfe_capture.c

index 71caebf125f1f0646e47cbeea9887a94ea14f421..6c41782b3ba089ee3344fc5fff40a11c05c4f9b4 100644 (file)
@@ -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;
 }