[media] v4l2: add const to argument of write-only s_tuner ioctl
This ioctl is defined as IOW, so pass the argument as const. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Alexey Klimov <klimov.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Родитель
b530a447bb
Коммит
2f73c7c582
|
@ -1881,7 +1881,7 @@ static int cx25840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx25840_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int cx25840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct cx25840_state *state = to_state(sd);
|
struct cx25840_state *state = to_state(sd);
|
||||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||||
|
|
|
@ -535,7 +535,7 @@ static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int msp_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int msp_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct msp_state *state = to_state(sd);
|
struct msp_state *state = to_state(sd);
|
||||||
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
struct i2c_client *client = v4l2_get_subdevdata(sd);
|
||||||
|
|
|
@ -435,7 +435,7 @@ static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int saa6588_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct saa6588 *s = to_saa6588(sd);
|
struct saa6588 *s = to_saa6588(sd);
|
||||||
|
|
||||||
|
|
|
@ -1113,7 +1113,7 @@ static int saa717x_s_stream(struct v4l2_subdev *sd, int enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* change audio mode */
|
/* change audio mode */
|
||||||
static int saa717x_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int saa717x_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct saa717x_state *decoder = to_state(sd);
|
struct saa717x_state *decoder = to_state(sd);
|
||||||
int audio_mode;
|
int audio_mode;
|
||||||
|
|
|
@ -87,7 +87,7 @@ static int tda9840_status(struct v4l2_subdev *sd)
|
||||||
return byte & 0x60;
|
return byte & 0x60;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tda9840_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t)
|
static int tda9840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
int stat = tda9840_status(sd);
|
int stat = tda9840_status(sd);
|
||||||
int byte;
|
int byte;
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ static int tvaudio_s_routing(struct v4l2_subdev *sd,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tvaudio_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int tvaudio_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct CHIPSTATE *chip = to_state(sd);
|
struct CHIPSTATE *chip = to_state(sd);
|
||||||
struct CHIPDESC *desc = chip->desc;
|
struct CHIPDESC *desc = chip->desc;
|
||||||
|
|
|
@ -90,7 +90,7 @@ static int vp27smpx_s_std(struct v4l2_subdev *sd, v4l2_std_id norm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vp27smpx_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int vp27smpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct vp27smpx_state *state = to_state(sd);
|
struct vp27smpx_state *state = to_state(sd);
|
||||||
|
|
||||||
|
|
|
@ -1820,7 +1820,7 @@ static int bttv_s_input(struct file *file, void *priv, unsigned int i)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bttv_s_tuner(struct file *file, void *priv,
|
static int bttv_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct bttv_fh *fh = priv;
|
struct bttv_fh *fh = priv;
|
||||||
struct bttv *btv = fh->btv;
|
struct bttv *btv = fh->btv;
|
||||||
|
@ -1830,8 +1830,11 @@ static int bttv_s_tuner(struct file *file, void *priv,
|
||||||
|
|
||||||
bttv_call_all(btv, tuner, s_tuner, t);
|
bttv_call_all(btv, tuner, s_tuner, t);
|
||||||
|
|
||||||
if (btv->audio_mode_gpio)
|
if (btv->audio_mode_gpio) {
|
||||||
btv->audio_mode_gpio(btv, t, 1);
|
struct v4l2_tuner copy = *t;
|
||||||
|
|
||||||
|
btv->audio_mode_gpio(btv, ©, 1);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3279,7 +3282,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radio_s_tuner(struct file *file, void *priv,
|
static int radio_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct bttv_fh *fh = priv;
|
struct bttv_fh *fh = priv;
|
||||||
struct bttv *btv = fh->btv;
|
struct bttv *btv = fh->btv;
|
||||||
|
|
|
@ -809,7 +809,7 @@ static int cx18_av_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx18_av_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int cx18_av_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct cx18_av_state *state = to_cx18_av_state(sd);
|
struct cx18_av_state *state = to_cx18_av_state(sd);
|
||||||
struct cx18 *cx = v4l2_get_subdevdata(sd);
|
struct cx18 *cx = v4l2_get_subdevdata(sd);
|
||||||
|
|
|
@ -673,7 +673,7 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cx18_s_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
static int cx18_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct cx18_open_id *id = fh2id(fh);
|
struct cx18_open_id *id = fh2id(fh);
|
||||||
struct cx18 *cx = id->cx;
|
struct cx18 *cx = id->cx;
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx23885_fh *fh = file->private_data;
|
struct cx23885_fh *fh = file->private_data;
|
||||||
struct cx23885_dev *dev = fh->dev;
|
struct cx23885_dev *dev = fh->dev;
|
||||||
|
|
|
@ -1486,7 +1486,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev;
|
struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev;
|
||||||
|
|
||||||
|
|
|
@ -1397,7 +1397,7 @@ int cx25821_vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cx25821_vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
int cx25821_vidioc_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev;
|
struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev;
|
||||||
struct cx25821_fh *fh = priv;
|
struct cx25821_fh *fh = priv;
|
||||||
|
|
|
@ -159,7 +159,7 @@ extern int cx25821_vidioc_s_register(struct file *file, void *fh,
|
||||||
extern int cx25821_vidioc_g_tuner(struct file *file, void *priv,
|
extern int cx25821_vidioc_g_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t);
|
struct v4l2_tuner *t);
|
||||||
extern int cx25821_vidioc_s_tuner(struct file *file, void *priv,
|
extern int cx25821_vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t);
|
const struct v4l2_tuner *t);
|
||||||
|
|
||||||
extern int cx25821_is_valid_width(u32 width, v4l2_std_id tvnorm);
|
extern int cx25821_is_valid_width(u32 width, v4l2_std_id tvnorm);
|
||||||
extern int cx25821_is_valid_height(u32 height, v4l2_std_id tvnorm);
|
extern int cx25821_is_valid_height(u32 height, v4l2_std_id tvnorm);
|
||||||
|
|
|
@ -918,7 +918,7 @@ static int vidioc_g_tuner (struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner (struct file *file, void *priv,
|
static int vidioc_s_tuner (struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core;
|
struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core;
|
||||||
|
|
||||||
|
|
|
@ -1289,7 +1289,7 @@ static int vidioc_g_tuner (struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner (struct file *file, void *priv,
|
static int vidioc_s_tuner (struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core;
|
struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core;
|
||||||
|
|
||||||
|
@ -1409,20 +1409,15 @@ static int radio_g_tuner (struct file *file, void *priv,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Should add a standard for radio */
|
|
||||||
|
|
||||||
static int radio_s_tuner (struct file *file, void *priv,
|
static int radio_s_tuner (struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core;
|
struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core;
|
||||||
|
|
||||||
if (0 != t->index)
|
if (0 != t->index)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (t->audmode > V4L2_TUNER_MODE_STEREO)
|
|
||||||
t->audmode = V4L2_TUNER_MODE_STEREO;
|
|
||||||
|
|
||||||
call_all(core, tuner, s_tuner, t);
|
call_all(core, tuner, s_tuner, t);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ static int subdev_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int subdev_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int subdev_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct ivtv *itv = sd_to_ivtv(sd);
|
struct ivtv *itv = sd_to_ivtv(sd);
|
||||||
u16 mask, data;
|
u16 mask, data;
|
||||||
|
|
|
@ -1196,7 +1196,7 @@ static int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ivtv_s_tuner(struct file *file, void *fh, struct v4l2_tuner *vt)
|
static int ivtv_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct ivtv_open_id *id = fh2id(fh);
|
struct ivtv_open_id *id = fh2id(fh);
|
||||||
struct ivtv *itv = id->itv;
|
struct ivtv *itv = id->itv;
|
||||||
|
|
|
@ -2023,7 +2023,7 @@ static int saa7134_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int saa7134_s_tuner(struct file *file, void *priv,
|
static int saa7134_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct saa7134_fh *fh = priv;
|
struct saa7134_fh *fh = priv;
|
||||||
struct saa7134_dev *dev = fh->dev;
|
struct saa7134_dev *dev = fh->dev;
|
||||||
|
@ -2347,7 +2347,7 @@ static int radio_g_tuner(struct file *file, void *priv,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static int radio_s_tuner(struct file *file, void *priv,
|
static int radio_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct saa7134_fh *fh = file->private_data;
|
struct saa7134_fh *fh = file->private_data;
|
||||||
struct saa7134_dev *dev = fh->dev;
|
struct saa7134_dev *dev = fh->dev;
|
||||||
|
|
|
@ -560,7 +560,7 @@ static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
|
||||||
return call_all(dev, tuner, g_tuner, t);
|
return call_all(dev, tuner, g_tuner, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
|
static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
|
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
|
||||||
struct mxb *mxb = (struct mxb *)dev->ext_priv;
|
struct mxb *mxb = (struct mxb *)dev->ext_priv;
|
||||||
|
|
|
@ -318,7 +318,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
/* Update the A/V core */
|
/* Update the A/V core */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -290,7 +290,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
/* Update the A/V core */
|
/* Update the A/V core */
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -366,7 +366,7 @@ static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t)
|
static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
|
struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev;
|
||||||
struct av7110 *av7110 = (struct av7110 *)dev->ext_priv;
|
struct av7110 *av7110 = (struct av7110 *)dev->ext_priv;
|
||||||
|
|
|
@ -208,7 +208,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
return v->index ? -EINVAL : 0;
|
return v->index ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
return v->index ? -EINVAL : 0;
|
return v->index ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ static int radio_isa_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radio_isa_s_tuner(struct file *file, void *priv,
|
static int radio_isa_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct radio_isa_card *isa = video_drvdata(file);
|
struct radio_isa_card *isa = video_drvdata(file);
|
||||||
const struct radio_isa_ops *ops = isa->drv->ops;
|
const struct radio_isa_ops *ops = isa->drv->ops;
|
||||||
|
|
|
@ -239,7 +239,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
|
|
||||||
/* vidioc_s_tuner - set tuner attributes */
|
/* vidioc_s_tuner - set tuner attributes */
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct ma901radio_device *radio = video_drvdata(file);
|
struct ma901radio_device *radio = video_drvdata(file);
|
||||||
|
|
||||||
|
|
|
@ -103,16 +103,18 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct pcm20 *dev = video_drvdata(file);
|
struct pcm20 *dev = video_drvdata(file);
|
||||||
|
|
||||||
if (v->index)
|
if (v->index)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (v->audmode > V4L2_TUNER_MODE_STEREO)
|
if (v->audmode > V4L2_TUNER_MODE_STEREO)
|
||||||
v->audmode = V4L2_TUNER_MODE_STEREO;
|
dev->audmode = V4L2_TUNER_MODE_STEREO;
|
||||||
|
else
|
||||||
|
dev->audmode = v->audmode;
|
||||||
snd_aci_cmd(dev->aci, ACI_SET_TUNERMONO,
|
snd_aci_cmd(dev->aci, ACI_SET_TUNERMONO,
|
||||||
v->audmode == V4L2_TUNER_MODE_MONO, -1);
|
dev->audmode == V4L2_TUNER_MODE_MONO, -1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
|
|
||||||
/* vidioc_s_tuner - set tuner attributes */
|
/* vidioc_s_tuner - set tuner attributes */
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct amradio_device *radio = video_drvdata(file);
|
struct amradio_device *radio = video_drvdata(file);
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
return v->index ? -EINVAL : 0;
|
return v->index ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -339,7 +339,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct tea5764_device *radio = video_drvdata(file);
|
struct tea5764_device *radio = video_drvdata(file);
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct radio_tea5777 *tea = video_drvdata(file);
|
struct radio_tea5777 *tea = video_drvdata(file);
|
||||||
u32 orig_audmode = tea->audmode;
|
u32 orig_audmode = tea->audmode;
|
||||||
|
@ -344,10 +344,9 @@ static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
if (v->index)
|
if (v->index)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (v->audmode > V4L2_TUNER_MODE_STEREO)
|
|
||||||
v->audmode = V4L2_TUNER_MODE_STEREO;
|
|
||||||
|
|
||||||
tea->audmode = v->audmode;
|
tea->audmode = v->audmode;
|
||||||
|
if (tea->audmode > V4L2_TUNER_MODE_STEREO)
|
||||||
|
tea->audmode = V4L2_TUNER_MODE_STEREO;
|
||||||
|
|
||||||
if (tea->audmode != orig_audmode && tea->band == BAND_FM)
|
if (tea->audmode != orig_audmode && tea->band == BAND_FM)
|
||||||
return radio_tea5777_set_freq(tea);
|
return radio_tea5777_set_freq(tea);
|
||||||
|
|
|
@ -56,7 +56,7 @@ static int timbradio_vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int timbradio_vidioc_s_tuner(struct file *file, void *priv,
|
static int timbradio_vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct timbradio *tr = video_drvdata(file);
|
struct timbradio *tr = video_drvdata(file);
|
||||||
return v4l2_subdev_call(tr->sd_tuner, tuner, s_tuner, v);
|
return v4l2_subdev_call(tr->sd_tuner, tuner, s_tuner, v);
|
||||||
|
|
|
@ -1559,7 +1559,7 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wl1273_fm_vidioc_s_tuner(struct file *file, void *priv,
|
static int wl1273_fm_vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *tuner)
|
const struct v4l2_tuner *tuner)
|
||||||
{
|
{
|
||||||
struct wl1273_device *radio = video_get_drvdata(video_devdata(file));
|
struct wl1273_device *radio = video_get_drvdata(video_devdata(file));
|
||||||
struct wl1273_core *core = radio->core;
|
struct wl1273_core *core = radio->core;
|
||||||
|
|
|
@ -636,7 +636,7 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
|
||||||
* si470x_vidioc_s_tuner - set tuner attributes
|
* si470x_vidioc_s_tuner - set tuner attributes
|
||||||
*/
|
*/
|
||||||
static int si470x_vidioc_s_tuner(struct file *file, void *priv,
|
static int si470x_vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *tuner)
|
const struct v4l2_tuner *tuner)
|
||||||
{
|
{
|
||||||
struct si470x_device *radio = video_drvdata(file);
|
struct si470x_device *radio = video_drvdata(file);
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ static int tef6862_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int tef6862_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v)
|
static int tef6862_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
return v->index ? -EINVAL : 0;
|
return v->index ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -331,7 +331,7 @@ static int fm_v4l2_vidioc_g_tuner(struct file *file, void *priv,
|
||||||
* Should we set other tuner attributes, too?
|
* Should we set other tuner attributes, too?
|
||||||
*/
|
*/
|
||||||
static int fm_v4l2_vidioc_s_tuner(struct file *file, void *priv,
|
static int fm_v4l2_vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *tuner)
|
const struct v4l2_tuner *tuner)
|
||||||
{
|
{
|
||||||
struct fmdev *fmdev = video_drvdata(file);
|
struct fmdev *fmdev = video_drvdata(file);
|
||||||
u16 aud_mode;
|
u16 aud_mode;
|
||||||
|
|
|
@ -1508,7 +1508,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct au0828_fh *fh = priv;
|
struct au0828_fh *fh = priv;
|
||||||
struct au0828_dev *dev = fh->dev;
|
struct au0828_dev *dev = fh->dev;
|
||||||
|
@ -1516,8 +1516,6 @@ static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
if (t->index != 0)
|
if (t->index != 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
t->type = V4L2_TUNER_ANALOG_TV;
|
|
||||||
|
|
||||||
if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
|
if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl)
|
||||||
dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);
|
dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1);
|
||||||
|
|
||||||
|
|
|
@ -1139,7 +1139,7 @@ int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cx231xx_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
int cx231xx_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx231xx_fh *fh = priv;
|
struct cx231xx_fh *fh = priv;
|
||||||
struct cx231xx *dev = fh->dev;
|
struct cx231xx *dev = fh->dev;
|
||||||
|
@ -1808,7 +1808,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
static int radio_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t)
|
static int radio_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev;
|
struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev;
|
||||||
|
|
||||||
|
|
|
@ -936,7 +936,7 @@ void cx231xx_close_extension(struct cx231xx *dev);
|
||||||
int cx231xx_querycap(struct file *file, void *priv,
|
int cx231xx_querycap(struct file *file, void *priv,
|
||||||
struct v4l2_capability *cap);
|
struct v4l2_capability *cap);
|
||||||
int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t);
|
int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t);
|
||||||
int cx231xx_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t);
|
int cx231xx_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t);
|
||||||
int cx231xx_g_frequency(struct file *file, void *priv,
|
int cx231xx_g_frequency(struct file *file, void *priv,
|
||||||
struct v4l2_frequency *f);
|
struct v4l2_frequency *f);
|
||||||
int cx231xx_s_frequency(struct file *file, void *priv,
|
int cx231xx_s_frequency(struct file *file, void *priv,
|
||||||
|
|
|
@ -1195,7 +1195,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct em28xx_fh *fh = priv;
|
struct em28xx_fh *fh = priv;
|
||||||
struct em28xx *dev = fh->dev;
|
struct em28xx *dev = fh->dev;
|
||||||
|
@ -1493,7 +1493,7 @@ static int radio_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radio_s_tuner(struct file *file, void *priv,
|
static int radio_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct em28xx *dev = ((struct em28xx_fh *)priv)->dev;
|
struct em28xx *dev = ((struct em28xx_fh *)priv)->dev;
|
||||||
|
|
||||||
|
|
|
@ -352,7 +352,7 @@ static int pvr2_g_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
|
||||||
return pvr2_hdw_get_tuner_status(hdw, vt);
|
return pvr2_hdw_get_tuner_status(hdw, vt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pvr2_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
|
static int pvr2_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct pvr2_v4l2_fh *fh = file->private_data;
|
struct pvr2_v4l2_fh *fh = file->private_data;
|
||||||
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
|
struct pvr2_hdw *hdw = fh->channel.mc_head->hdw;
|
||||||
|
|
|
@ -283,7 +283,7 @@ static int tlg_fm_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
|
static int vidioc_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
return vt->index > 0 ? -EINVAL : 0;
|
return vt->index > 0 ? -EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1031,7 +1031,7 @@ static int pd_vidioc_s_tuner(struct poseidon *pd, int index)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *a)
|
static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *a)
|
||||||
{
|
{
|
||||||
struct front_face *front = fh;
|
struct front_face *front = fh;
|
||||||
struct poseidon *pd = front->pd;
|
struct poseidon *pd = front->pd;
|
||||||
|
|
|
@ -1215,7 +1215,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct tm6000_fh *fh = priv;
|
struct tm6000_fh *fh = priv;
|
||||||
struct tm6000_core *dev = fh->dev;
|
struct tm6000_core *dev = fh->dev;
|
||||||
|
@ -1293,18 +1293,14 @@ static int radio_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int radio_s_tuner(struct file *file, void *priv,
|
static int radio_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct tm6000_fh *fh = file->private_data;
|
struct tm6000_fh *fh = file->private_data;
|
||||||
struct tm6000_core *dev = fh->dev;
|
struct tm6000_core *dev = fh->dev;
|
||||||
|
|
||||||
if (0 != t->index)
|
if (0 != t->index)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (t->audmode > V4L2_TUNER_MODE_STEREO)
|
|
||||||
t->audmode = V4L2_TUNER_MODE_STEREO;
|
|
||||||
|
|
||||||
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
|
v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -628,7 +628,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *vt)
|
const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct usb_usbvision *usbvision = video_drvdata(file);
|
struct usb_usbvision *usbvision = video_drvdata(file);
|
||||||
|
|
||||||
|
|
|
@ -1233,7 +1233,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
||||||
* Note: vt->type should be initialized before calling it.
|
* Note: vt->type should be initialized before calling it.
|
||||||
* This is done by either video_ioctl2 or by the bridge driver.
|
* This is done by either video_ioctl2 or by the bridge driver.
|
||||||
*/
|
*/
|
||||||
static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
|
static int tuner_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt)
|
||||||
{
|
{
|
||||||
struct tuner *t = to_tuner(sd);
|
struct tuner *t = to_tuner(sd);
|
||||||
|
|
||||||
|
|
|
@ -1242,7 +1242,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *t)
|
const struct v4l2_tuner *t)
|
||||||
{
|
{
|
||||||
struct go7007 *go = ((struct go7007_file *) priv)->go;
|
struct go7007 *go = ((struct go7007_file *) priv)->go;
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ struct v4l2_ioctl_ops {
|
||||||
int (*vidioc_g_tuner) (struct file *file, void *fh,
|
int (*vidioc_g_tuner) (struct file *file, void *fh,
|
||||||
struct v4l2_tuner *a);
|
struct v4l2_tuner *a);
|
||||||
int (*vidioc_s_tuner) (struct file *file, void *fh,
|
int (*vidioc_s_tuner) (struct file *file, void *fh,
|
||||||
struct v4l2_tuner *a);
|
const struct v4l2_tuner *a);
|
||||||
int (*vidioc_g_frequency) (struct file *file, void *fh,
|
int (*vidioc_g_frequency) (struct file *file, void *fh,
|
||||||
struct v4l2_frequency *a);
|
struct v4l2_frequency *a);
|
||||||
int (*vidioc_s_frequency) (struct file *file, void *fh,
|
int (*vidioc_s_frequency) (struct file *file, void *fh,
|
||||||
|
|
|
@ -194,7 +194,7 @@ struct v4l2_subdev_tuner_ops {
|
||||||
int (*s_frequency)(struct v4l2_subdev *sd, const struct v4l2_frequency *freq);
|
int (*s_frequency)(struct v4l2_subdev *sd, const struct v4l2_frequency *freq);
|
||||||
int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
|
int (*g_frequency)(struct v4l2_subdev *sd, struct v4l2_frequency *freq);
|
||||||
int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
|
int (*g_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
|
||||||
int (*s_tuner)(struct v4l2_subdev *sd, struct v4l2_tuner *vt);
|
int (*s_tuner)(struct v4l2_subdev *sd, const struct v4l2_tuner *vt);
|
||||||
int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
|
int (*g_modulator)(struct v4l2_subdev *sd, struct v4l2_modulator *vm);
|
||||||
int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
|
int (*s_modulator)(struct v4l2_subdev *sd, const struct v4l2_modulator *vm);
|
||||||
int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
|
int (*s_type_addr)(struct v4l2_subdev *sd, struct tuner_setup *type);
|
||||||
|
|
|
@ -306,7 +306,7 @@ static int vidioc_g_tuner(struct file *file, void *priv,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vidioc_s_tuner(struct file *file, void *priv,
|
static int vidioc_s_tuner(struct file *file, void *priv,
|
||||||
struct v4l2_tuner *v)
|
const struct v4l2_tuner *v)
|
||||||
{
|
{
|
||||||
struct snd_tea575x *tea = video_drvdata(file);
|
struct snd_tea575x *tea = video_drvdata(file);
|
||||||
u32 orig_val = tea->val;
|
u32 orig_val = tea->val;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче