diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-15 10:10:06 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 10:31:23 +0100 |
commit | 2f73c7c582a685b3198b974cd6d964d0338f8ab5 (patch) | |
tree | d95d1dd1665bd59d09dfd7455c8f096a6fb29352 /drivers/media/pci | |
parent | [media] v4l2: add const to argument of write-only s_frequency ioctl (diff) | |
download | linux-2f73c7c582a685b3198b974cd6d964d0338f8ab5.tar.xz linux-2f73c7c582a685b3198b974cd6d964d0338f8ab5.zip |
[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>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 11 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-av-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-ioctl.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-417.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-video.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-video.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx25821/cx25821-video.h | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-blackbird.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-video.c | 9 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-gpio.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-video.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/saa7146/mxb.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-encoder.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7164/saa7164-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/ttpci/av7110_v4l.c | 2 |
16 files changed, 24 insertions, 26 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index 3156daf2c804..7aea24bf3a37 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c @@ -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, - struct v4l2_tuner *t) + const struct v4l2_tuner *t) { struct bttv_fh *fh = priv; 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); - if (btv->audio_mode_gpio) - btv->audio_mode_gpio(btv, t, 1); + if (btv->audio_mode_gpio) { + struct v4l2_tuner copy = *t; + + btv->audio_mode_gpio(btv, ©, 1); + } 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, - struct v4l2_tuner *t) + const struct v4l2_tuner *t) { struct bttv_fh *fh = priv; struct bttv *btv = fh->btv; diff --git a/drivers/media/pci/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c index a2c51e0468a8..c22242bc10df 100644 --- a/drivers/media/pci/cx18/cx18-av-core.c +++ b/drivers/media/pci/cx18/cx18-av-core.c @@ -809,7 +809,7 @@ static int cx18_av_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) 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 *cx = v4l2_get_subdevdata(sd); diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 5cd22e7095e6..173ccd204c1f 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c @@ -673,7 +673,7 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std) 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 *cx = id->cx; diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 84a1b75d5444..812ec5ff5939 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1280,7 +1280,7 @@ static int vidioc_g_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_dev *dev = fh->dev; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 5ba15b8dafe0..2bbda43eb00e 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -1486,7 +1486,7 @@ static int vidioc_g_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; diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 1219d60cdd79..75281c1530d8 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c @@ -1397,7 +1397,7 @@ int cx25821_vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) 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_fh *fh = priv; diff --git a/drivers/media/pci/cx25821/cx25821-video.h b/drivers/media/pci/cx25821/cx25821-video.h index 969340c2dcfa..f0e70ffbedd4 100644 --- a/drivers/media/pci/cx25821/cx25821-video.h +++ b/drivers/media/pci/cx25821/cx25821-video.h @@ -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, struct v4l2_tuner *t); 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_height(u32 height, v4l2_std_id tvnorm); diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index 82aa11f526f0..486ca8d5f2a0 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -918,7 +918,7 @@ static int vidioc_g_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; diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index 4f10875295e8..ede6f139b5cc 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -1289,7 +1289,7 @@ static int vidioc_g_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; @@ -1409,20 +1409,15 @@ static int radio_g_tuner (struct file *file, void *priv, return 0; } -/* FIXME: Should add a standard for radio */ - 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; if (0 != t->index) return -EINVAL; - if (t->audmode > V4L2_TUNER_MODE_STEREO) - t->audmode = V4L2_TUNER_MODE_STEREO; call_all(core, tuner, s_tuner, t); - return 0; } diff --git a/drivers/media/pci/ivtv/ivtv-gpio.c b/drivers/media/pci/ivtv/ivtv-gpio.c index 8f0d07789053..af52def700cc 100644 --- a/drivers/media/pci/ivtv/ivtv-gpio.c +++ b/drivers/media/pci/ivtv/ivtv-gpio.c @@ -192,7 +192,7 @@ static int subdev_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) 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); u16 mask, data; diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index e6258b68d22c..852f11e0d636 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c @@ -1196,7 +1196,7 @@ static int ivtv_s_std(struct file *file, void *fh, v4l2_std_id *std) 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 *itv = id->itv; diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index 6c619d13f731..1e23547531b9 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -2023,7 +2023,7 @@ static int saa7134_g_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_dev *dev = fh->dev; @@ -2347,7 +2347,7 @@ static int radio_g_tuner(struct file *file, void *priv, return 0; } 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_dev *dev = fh->dev; diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c index 27dc49b03d02..9dd044b563e7 100644 --- a/drivers/media/pci/saa7146/mxb.c +++ b/drivers/media/pci/saa7146/mxb.c @@ -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); } -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 mxb *mxb = (struct mxb *)dev->ext_priv; diff --git a/drivers/media/pci/saa7164/saa7164-encoder.c b/drivers/media/pci/saa7164/saa7164-encoder.c index 34f700da2e7a..e7fbd036ba44 100644 --- a/drivers/media/pci/saa7164/saa7164-encoder.c +++ b/drivers/media/pci/saa7164/saa7164-encoder.c @@ -318,7 +318,7 @@ static int vidioc_g_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 */ return 0; diff --git a/drivers/media/pci/saa7164/saa7164-vbi.c b/drivers/media/pci/saa7164/saa7164-vbi.c index 5a8a6adb894b..bfc8cec110de 100644 --- a/drivers/media/pci/saa7164/saa7164-vbi.c +++ b/drivers/media/pci/saa7164/saa7164-vbi.c @@ -290,7 +290,7 @@ static int vidioc_g_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 */ return 0; diff --git a/drivers/media/pci/ttpci/av7110_v4l.c b/drivers/media/pci/ttpci/av7110_v4l.c index 65adaa74c511..6c4076acb131 100644 --- a/drivers/media/pci/ttpci/av7110_v4l.c +++ b/drivers/media/pci/ttpci/av7110_v4l.c @@ -366,7 +366,7 @@ static int vidioc_g_tuner(struct file *file, void *fh, struct v4l2_tuner *t) 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 av7110 *av7110 = (struct av7110 *)dev->ext_priv; |