summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/sh_vou.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-09-28 07:28:58 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-22 10:37:40 -0200
commit17803580ace1953e78a995423f4945f77f0deb80 (patch)
tree6114e30412b143e77cdd8c475816bc0916a7ec58 /drivers/media/platform/sh_vou.c
parentcf9afb1dafaf1ffeffbb4acdb5adf255e8a2aa76 (diff)
downloadop-kernel-dev-17803580ace1953e78a995423f4945f77f0deb80.zip
op-kernel-dev-17803580ace1953e78a995423f4945f77f0deb80.tar.gz
[media] media: sh_vou: fix const cropping related warnings
A recent commit "[media] v4l2: make vidioc_s_crop const" introduced warnings in sh_vou. 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/sh_vou.c')
-rw-r--r--drivers/media/platform/sh_vou.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index 85fd312..a1c87f0 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -935,9 +935,10 @@ static int sh_vou_g_crop(struct file *file, void *fh, struct v4l2_crop *a)
/* Assume a dull encoder, do all the work ourselves. */
static int sh_vou_s_crop(struct file *file, void *fh, const struct v4l2_crop *a)
{
+ struct v4l2_crop a_writable = *a;
struct video_device *vdev = video_devdata(file);
struct sh_vou_device *vou_dev = video_get_drvdata(vdev);
- struct v4l2_rect *rect = &a->c;
+ struct v4l2_rect *rect = &a_writable.c;
struct v4l2_crop sd_crop = {.type = V4L2_BUF_TYPE_VIDEO_OUTPUT};
struct v4l2_pix_format *pix = &vou_dev->pix;
struct sh_vou_geometry geo;
OpenPOWER on IntegriCloud