[media] v4l2: make vidioc_s_audio const

Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_audio.
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>
This commit is contained in:
Hans Verkuil 2012-09-04 11:59:31 -03:00 committed by Mauro Carvalho Chehab
parent 85f5fe3962
commit 0e8025b9f6
23 changed files with 27 additions and 27 deletions

View File

@ -3076,7 +3076,7 @@ static int bttv_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
static int bttv_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
static int bttv_s_audio(struct file *file, void *priv, const struct v4l2_audio *a)
{
if (unlikely(a->index))
return -EINVAL;
@ -3480,7 +3480,7 @@ static int radio_s_tuner(struct file *file, void *priv,
}
static int radio_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
if (unlikely(a->index))
return -EINVAL;

View File

@ -492,7 +492,7 @@ static int cx18_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
return cx18_get_audio_input(cx, vin->index, vin);
}
static int cx18_s_audio(struct file *file, void *fh, struct v4l2_audio *vout)
static int cx18_s_audio(struct file *file, void *fh, const struct v4l2_audio *vout)
{
struct cx18 *cx = fh2id(fh)->cx;

View File

@ -1426,7 +1426,7 @@ static int vidioc_g_audinput(struct file *file, void *priv,
}
static int vidioc_s_audinput(struct file *file, void *priv,
struct v4l2_audio *i)
const struct v4l2_audio *i)
{
struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev;
if (i->index >= 2)

View File

@ -784,7 +784,7 @@ static int ivtv_g_audio(struct file *file, void *fh, struct v4l2_audio *vin)
return ivtv_get_audio_input(itv, vin->index, vin);
}
static int ivtv_s_audio(struct file *file, void *fh, struct v4l2_audio *vout)
static int ivtv_s_audio(struct file *file, void *fh, const struct v4l2_audio *vout)
{
struct ivtv *itv = fh2id(fh)->itv;

View File

@ -2089,7 +2089,7 @@ static int saa7134_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
static int saa7134_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
static int saa7134_s_audio(struct file *file, void *priv, const struct v4l2_audio *a)
{
return 0;
}
@ -2373,7 +2373,7 @@ static int radio_g_audio(struct file *file, void *priv,
}
static int radio_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return 0;
}

View File

@ -646,7 +646,7 @@ static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *a)
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
struct mxb *mxb = (struct mxb *)dev->ext_priv;

View File

@ -526,7 +526,7 @@ static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *a)
{
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
struct av7110 *av7110 = (struct av7110 *)dev->ext_priv;

View File

@ -197,7 +197,7 @@ static int vidioc_g_audio(struct file *file, void *priv,
}
static int vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return a->index ? -EINVAL : 0;
}

View File

@ -239,7 +239,7 @@ static int vidioc_g_audio(struct file *file, void *priv,
}
static int vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return a->index ? -EINVAL : 0;
}

View File

@ -448,7 +448,7 @@ static int vidioc_g_audio(struct file *file, void *priv,
}
static int vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
if (a->index != 0)
return -EINVAL;

View File

@ -85,7 +85,7 @@ static int timbradio_vidioc_g_audio(struct file *file, void *priv,
}
static int timbradio_vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return a->index ? -EINVAL : 0;
}

View File

@ -1479,7 +1479,7 @@ static int wl1273_fm_vidioc_g_audio(struct file *file, void *priv,
}
static int wl1273_fm_vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *audio)
const struct v4l2_audio *audio)
{
struct wl1273_device *radio = video_get_drvdata(video_devdata(file));

View File

@ -258,7 +258,7 @@ static int fm_v4l2_vidioc_g_audio(struct file *file, void *priv,
}
static int fm_v4l2_vidioc_s_audio(struct file *file, void *priv,
struct v4l2_audio *audio)
const struct v4l2_audio *audio)
{
if (audio->index != 0)
return -EINVAL;

View File

@ -1465,7 +1465,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio *a)
{
struct au0828_fh *fh = priv;
struct au0828_dev *dev = fh->dev;

View File

@ -1253,7 +1253,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio *a)
{
struct cx231xx_fh *fh = priv;
struct cx231xx *dev = fh->dev;
@ -2096,7 +2096,7 @@ static int radio_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
return 0;
}
static int radio_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
static int radio_s_audio(struct file *file, void *fh, const struct v4l2_audio *a)
{
return 0;
}

View File

@ -1352,7 +1352,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio *a)
{
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
@ -2087,7 +2087,7 @@ static int radio_s_tuner(struct file *file, void *priv,
}
static int radio_s_audio(struct file *file, void *fh,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return 0;
}

View File

@ -677,7 +677,7 @@ static int vidioc_enumaudio(struct file *file, void *priv,
}
static int vidioc_s_audio(struct file *file, void *private_data,
struct v4l2_audio *audio)
const struct v4l2_audio *audio)
{
struct hdpvr_fh *fh = file->private_data;
struct hdpvr_device *dev = fh->dev;

View File

@ -333,7 +333,7 @@ static int pvr2_g_audio(struct file *file, void *priv, struct v4l2_audio *vin)
return 0;
}
static int pvr2_s_audio(struct file *file, void *priv, struct v4l2_audio *vout)
static int pvr2_s_audio(struct file *file, void *priv, const struct v4l2_audio *vout)
{
if (vout->index)
return -EINVAL;

View File

@ -348,7 +348,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
{
return vt->index > 0 ? -EINVAL : 0;
}
static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *va)
static int vidioc_s_audio(struct file *file, void *priv, const struct v4l2_audio *va)
{
return (va->index != 0) ? -EINVAL : 0;
}

View File

@ -1029,7 +1029,7 @@ static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
return 0;
}
static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
static int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio *a)
{
return (0 == a->index) ? 0 : -EINVAL;
}

View File

@ -1401,7 +1401,7 @@ static int radio_g_audio(struct file *file, void *priv,
}
static int radio_s_audio(struct file *file, void *priv,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
return 0;
}

View File

@ -684,7 +684,7 @@ static int vidioc_g_audio(struct file *file, void *priv, struct v4l2_audio *a)
}
static int vidioc_s_audio(struct file *file, void *fh,
struct v4l2_audio *a)
const struct v4l2_audio *a)
{
if (a->index)
return -EINVAL;

View File

@ -167,7 +167,7 @@ struct v4l2_ioctl_ops {
int (*vidioc_g_audio) (struct file *file, void *fh,
struct v4l2_audio *a);
int (*vidioc_s_audio) (struct file *file, void *fh,
struct v4l2_audio *a);
const struct v4l2_audio *a);
/* Audio out ioctls */
int (*vidioc_enumaudout) (struct file *file, void *fh,