aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/usb/uvc/uvc_ctrl.c2
-rw-r--r--drivers/media/usb/uvc/uvc_v4l2.c6
2 files changed, 4 insertions, 4 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,
1838{ 1838{
1839 int ret = 0; 1839 int ret = 0;
1840 1840
1841 memcpy(&ctrl->info, info, sizeof(*info)); 1841 ctrl->info = *info;
1842 INIT_LIST_HEAD(&ctrl->info.mappings); 1842 INIT_LIST_HEAD(&ctrl->info.mappings);
1843 1843
1844 /* Allocate an array to save control values (cur, def, max, etc.) */ 1844 /* Allocate an array to save control values (cur, def, max, etc.) */
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 68d59b527492..97a4ffde5d6f 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -315,7 +315,7 @@ static int uvc_v4l2_set_format(struct uvc_streaming *stream,
315 goto done; 315 goto done;
316 } 316 }
317 317
318 memcpy(&stream->ctrl, &probe, sizeof probe); 318 stream->ctrl = probe;
319 stream->cur_format = format; 319 stream->cur_format = format;
320 stream->cur_frame = frame; 320 stream->cur_frame = frame;
321 321
@@ -387,7 +387,7 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream,
387 return -EBUSY; 387 return -EBUSY;
388 } 388 }
389 389
390 memcpy(&probe, &stream->ctrl, sizeof probe); 390 probe = stream->ctrl;
391 probe.dwFrameInterval = 391 probe.dwFrameInterval =
392 uvc_try_frame_interval(stream->cur_frame, interval); 392 uvc_try_frame_interval(stream->cur_frame, interval);
393 393
@@ -398,7 +398,7 @@ static int uvc_v4l2_set_streamparm(struct uvc_streaming *stream,
398 return ret; 398 return ret;
399 } 399 }
400 400
401 memcpy(&stream->ctrl, &probe, sizeof probe); 401 stream->ctrl = probe;
402 mutex_unlock(&stream->mutex); 402 mutex_unlock(&stream->mutex);
403 403
404 /* Return the actual frame period. */ 404 /* Return the actual frame period. */