[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: 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 12:08:47 -03:00 committed by Mauro Carvalho Chehab
parent ba9425bce9
commit 3f70e1f598
7 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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)
} }
/* 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;

View File

@ -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;

View File

@ -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);

View File

@ -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);
}; };