diff options
author | Ezequiel Garcia <elezegarcia@gmail.com> | 2013-01-14 22:22:55 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-05 20:31:36 +0400 |
commit | 8c0d44e250735b09e255ce0483c47eb2f68d3fa7 (patch) | |
tree | f17c238670b5e56b3600c13517e0de4c853348b0 /drivers/media/usb/uvc/uvc_ctrl.c | |
parent | 5d97046a371a44010bbfd18a75c2b107da30a606 (diff) | |
download | linux-8c0d44e250735b09e255ce0483c47eb2f68d3fa7.tar.xz |
[media] uvcvideo: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_ctrl.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c index d5baab17a5ef..61e28dec991d 100644 --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c @@ -1838,7 +1838,7 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, struct uvc_control *ctrl, { int ret = 0; - memcpy(&ctrl->info, info, sizeof(*info)); + ctrl->info = *info; INIT_LIST_HEAD(&ctrl->info.mappings); /* Allocate an array to save control values (cur, def, max, etc.) */ |