diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-09-28 07:46:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 10:45:13 -0200 |
commit | d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5 (patch) | |
tree | bc060656b997e61be0cfbc8d85267ae649695727 | |
parent | 60cd1ee17d9d91aeaa4224a15595dd27163ac57d (diff) | |
download | op-kernel-dev-d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5.zip op-kernel-dev-d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5.tar.gz |
[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>
-rw-r--r-- | drivers/media/platform/soc_camera/mx2_camera.c | 5 |
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 9fd9d1c..f36b362 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; |