Skip to content

Commit

Permalink
[media] media: mx2_camera: fix const cropping related warnings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Nov 22, 2012
1 parent 60cd1ee commit d63bb27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/media/platform/soc_camera/mx2_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d63bb27

Please sign in to comment.