Commit 60cd1ee1 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 448a61f0
...@@ -799,9 +799,10 @@ static inline void stride_align(__u32 *width) ...@@ -799,9 +799,10 @@ static inline void stride_align(__u32 *width)
* default g_crop and cropcap from soc_camera.c * default g_crop and cropcap from soc_camera.c
*/ */
static int mx3_camera_set_crop(struct soc_camera_device *icd, 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 soc_camera_host *ici = to_soc_camera_host(icd->parent);
struct mx3_camera_dev *mx3_cam = ici->priv; struct mx3_camera_dev *mx3_cam = ici->priv;
struct v4l2_subdev *sd = soc_camera_to_subdev(icd); struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment