diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-09-28 10:39:06 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 12:44:56 (GMT) |
commit | 60cd1ee17d9d91aeaa4224a15595dd27163ac57d (patch) | |
tree | 4108b584dc5d468c077b77549c7d34efb56e712e /drivers | |
parent | 448a61f09e319c54bf149a20d9c8f63d5242a936 (diff) | |
download | linux-60cd1ee17d9d91aeaa4224a15595dd27163ac57d.tar.xz |
[media] media: mx3_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced
warnings in mx3_camera. Fix them by cleanly separating writable and
read-only variables in cropping operations.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/soc_camera/mx3_camera.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 3557ac9..261f6e9 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c @@ -799,9 +799,10 @@ static inline void stride_align(__u32 *width) * default g_crop and cropcap from soc_camera.c */ static int mx3_camera_set_crop(struct soc_camera_device *icd, - struct v4l2_crop *a) + const struct v4l2_crop *a) { - struct v4l2_rect *rect = &a->c; + struct v4l2_crop a_writable = *a; + struct v4l2_rect *rect = &a_writable.c; struct soc_camera_host *ici = to_soc_camera_host(icd->parent); struct mx3_camera_dev *mx3_cam = ici->priv; struct v4l2_subdev *sd = soc_camera_to_subdev(icd); |