diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-09-28 12:46:52 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-11-22 13:45:13 +0100 |
commit | d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5 (patch) | |
tree | bc060656b997e61be0cfbc8d85267ae649695727 | |
parent | [media] media: mx3_camera: fix const cropping related warnings (diff) | |
download | linux-d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5.tar.xz linux-d63bb2790c0e1c44434cb2cc5292cd23d25d4ca5.zip |
[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 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; |