diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 99e35dd3d83ed3bd070165d1d7dc2b3f1c47baf3..d5cbb617775435075c756dcf27aaa21b89df5b48 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) diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index 5f366d16be260067ccd5d9f18cf53cfcbd012422..1e04101485a3b39abca2102bb80b1a9c7c9a7514 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c @@ -83,7 +83,7 @@ static int radio_si4713_g_audout(struct file *file, void *priv, } static int radio_si4713_s_audout(struct file *file, void *priv, - struct v4l2_audioout *vao) + const struct v4l2_audioout *vao) { return vao->index ? -EINVAL : 0; } diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index babbe09527cda09a5b9361b91f88a962487a6b00..d4c7729e8ecaa61fbb0240d39f007289f430af24 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -175,7 +175,7 @@ struct v4l2_ioctl_ops { int (*vidioc_g_audout) (struct file *file, void *fh, struct v4l2_audioout *a); int (*vidioc_s_audout) (struct file *file, void *fh, - struct v4l2_audioout *a); + const struct v4l2_audioout *a); int (*vidioc_g_modulator) (struct file *file, void *fh, struct v4l2_modulator *a); int (*vidioc_s_modulator) (struct file *file, void *fh,