提交 3f70e1f5 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] v4l2: make vidioc_s_modulator const

Write-only ioctls should have a const argument in the ioctl op.
Do this conversion for vidioc_s_modulator.
Adding const for write-only ioctls was decided during the 2012 Media Workshop.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 ba9425bc
...@@ -203,7 +203,7 @@ static int vidioc_g_modulator(struct file *file, void *priv, ...@@ -203,7 +203,7 @@ static int vidioc_g_modulator(struct file *file, void *priv,
} }
static int vidioc_s_modulator(struct file *file, void *priv, static int vidioc_s_modulator(struct file *file, void *priv,
struct v4l2_modulator *v) const struct v4l2_modulator *v)
{ {
struct keene_device *radio = video_drvdata(file); struct keene_device *radio = video_drvdata(file);
......
...@@ -200,7 +200,7 @@ static int radio_si4713_g_modulator(struct file *file, void *p, ...@@ -200,7 +200,7 @@ static int radio_si4713_g_modulator(struct file *file, void *p,
} }
static int radio_si4713_s_modulator(struct file *file, void *p, static int radio_si4713_s_modulator(struct file *file, void *p,
struct v4l2_modulator *vm) const struct v4l2_modulator *vm)
{ {
return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner, return v4l2_device_call_until_err(get_v4l2_dev(file), 0, tuner,
s_modulator, vm); s_modulator, vm);
......
...@@ -1715,7 +1715,7 @@ static int wl1273_fm_vidioc_s_hw_freq_seek(struct file *file, void *priv, ...@@ -1715,7 +1715,7 @@ static int wl1273_fm_vidioc_s_hw_freq_seek(struct file *file, void *priv,
} }
static int wl1273_fm_vidioc_s_modulator(struct file *file, void *priv, static int wl1273_fm_vidioc_s_modulator(struct file *file, void *priv,
struct v4l2_modulator *modulator) const struct v4l2_modulator *modulator)
{ {
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;
......
...@@ -1213,7 +1213,7 @@ static int si4713_write_econtrol_integers(struct si4713_device *sdev, ...@@ -1213,7 +1213,7 @@ static int si4713_write_econtrol_integers(struct si4713_device *sdev,
} }
static int si4713_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f); static int si4713_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f);
static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *); static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *);
/* /*
* si4713_setup - Sets the device up with current configuration. * si4713_setup - Sets the device up with current configuration.
* @sdev: si4713_device structure for the device we are communicating * @sdev: si4713_device structure for the device we are communicating
...@@ -1873,7 +1873,7 @@ static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm) ...@@ -1873,7 +1873,7 @@ static int si4713_g_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm)
} }
/* si4713_s_modulator - set modulator attributes */ /* si4713_s_modulator - set modulator attributes */
static int si4713_s_modulator(struct v4l2_subdev *sd, struct v4l2_modulator *vm) static int si4713_s_modulator(struct v4l2_subdev *sd, const struct v4l2_modulator *vm)
{ {
struct si4713_device *sdev = to_si4713_device(sd); struct si4713_device *sdev = to_si4713_device(sd);
int rval = 0; int rval = 0;
......
...@@ -448,7 +448,7 @@ static int fm_v4l2_vidioc_g_modulator(struct file *file, void *priv, ...@@ -448,7 +448,7 @@ static int fm_v4l2_vidioc_g_modulator(struct file *file, void *priv,
/* Set modulator attributes. If mode is not TX, set to TX. */ /* Set modulator attributes. If mode is not TX, set to TX. */
static int fm_v4l2_vidioc_s_modulator(struct file *file, void *priv, static int fm_v4l2_vidioc_s_modulator(struct file *file, void *priv,
struct v4l2_modulator *mod) const struct v4l2_modulator *mod)
{ {
struct fmdev *fmdev = video_drvdata(file); struct fmdev *fmdev = video_drvdata(file);
u8 rds_mode; u8 rds_mode;
......
...@@ -179,7 +179,7 @@ struct v4l2_ioctl_ops { ...@@ -179,7 +179,7 @@ struct v4l2_ioctl_ops {
int (*vidioc_g_modulator) (struct file *file, void *fh, int (*vidioc_g_modulator) (struct file *file, void *fh,
struct v4l2_modulator *a); struct v4l2_modulator *a);
int (*vidioc_s_modulator) (struct file *file, void *fh, int (*vidioc_s_modulator) (struct file *file, void *fh,
struct v4l2_modulator *a); const struct v4l2_modulator *a);
/* Crop ioctls */ /* Crop ioctls */
int (*vidioc_cropcap) (struct file *file, void *fh, int (*vidioc_cropcap) (struct file *file, void *fh,
struct v4l2_cropcap *a); struct v4l2_cropcap *a);
......
...@@ -194,7 +194,7 @@ struct v4l2_subdev_tuner_ops { ...@@ -194,7 +194,7 @@ struct v4l2_subdev_tuner_ops {
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, 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, 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);
int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config); int (*s_config)(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *config);
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册