summaryrefslogtreecommitdiff
path: root/drivers/media/platform/soc_camera
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-09-28 14:46:52 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-22 16:45:13 +0400
commitd63bb2790c0e1c44434cb2cc5292cd23d25d4ca5 (patch)
treebc060656b997e61be0cfbc8d85267ae649695727 /drivers/media/platform/soc_camera
parent60cd1ee17d9d91aeaa4224a15595dd27163ac57d (diff)
downloadlinux-d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5.tar.xz
[media] media: mx2_camera: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced warnings in mx2_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/media/platform/soc_camera')
-rw-r--r--drivers/media/platform/soc_camera/mx2_camera.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c
index 9fd9d1c5b218..f36b362aff69 100644
--- a/drivers/media/platform/soc_camera/mx2_camera.c
+++ b/drivers/media/platform/soc_camera/mx2_camera.c
@@ -1099,9 +1099,10 @@ static int mx2_camera_set_bus_param(struct soc_camera_device *icd)
}
static int mx2_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 v4l2_subdev *sd = soc_camera_to_subdev(icd);
struct v4l2_mbus_framefmt mf;
int ret;