summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-04 17:03:49 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 15:56:23 +0200
commitba9425bce9e162eee0741d9a94e0d6f68e0242ab (patch)
tree68a767a4c9427b040827dd2c1dd908dca040605c /drivers/media/pci
parent[media] v4l2: make vidioc_s_audio const (diff)
downloadlinux-ba9425bce9e162eee0741d9a94e0d6f68e0242ab.tar.xz
linux-ba9425bce9e162eee0741d9a94e0d6f68e0242ab.zip
[media] v4l2: make vidioc_s_audout const
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audout. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/ivtv/ivtv-ioctl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 99e35dd3d83e..d5cbb6177754 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -813,11 +813,13 @@ static int ivtv_g_audout(struct file *file, void *fh, struct v4l2_audioout *vin)
return ivtv_get_audio_output(itv, vin->index, vin);
}
-static int ivtv_s_audout(struct file *file, void *fh, struct v4l2_audioout *vout)
+static int ivtv_s_audout(struct file *file, void *fh, const struct v4l2_audioout *vout)
{
struct ivtv *itv = fh2id(fh)->itv;
- return ivtv_get_audio_output(itv, vout->index, vout);
+ if (itv->card->video_outputs == NULL || vout->index != 0)
+ return -EINVAL;
+ return 0;
}
static int ivtv_enum_input(struct file *file, void *fh, struct v4l2_input *vin)