diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-03-15 05:10:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-24 05:31:23 -0400 |
commit | 2f73c7c582a685b3198b974cd6d964d0338f8ab5 (patch) | |
tree | d95d1dd1665bd59d09dfd7455c8f096a6fb29352 /drivers/media/pci | |
parent | b530a447bb588fdf43fdf4eb909e4ee1921d47ac (diff) |
[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) | |||
1820 | } | 1820 | } |
1821 | 1821 | ||
1822 | static int bttv_s_tuner(struct file *file, void *priv, | 1822 | static int bttv_s_tuner(struct file *file, void *priv, |
1823 | struct v4l2_tuner *t) | 1823 | const struct v4l2_tuner *t) |
1824 | { | 1824 | { |
1825 | struct bttv_fh *fh = priv; | 1825 | struct bttv_fh *fh = priv; |
1826 | struct bttv *btv = fh->btv; | 1826 | struct bttv *btv = fh->btv; |
@@ -1830,8 +1830,11 @@ static int bttv_s_tuner(struct file *file, void *priv, | |||
1830 | 1830 | ||
1831 | bttv_call_all(btv, tuner, s_tuner, t); | 1831 | bttv_call_all(btv, tuner, s_tuner, t); |
1832 | 1832 | ||
1833 | if (btv->audio_mode_gpio) | 1833 | if (btv->audio_mode_gpio) { |
1834 | btv->audio_mode_gpio(btv, t, 1); | 1834 | struct v4l2_tuner copy = *t; |
1835 | |||
1836 | btv->audio_mode_gpio(btv, ©, 1); | ||
1837 | } | ||
1835 | return 0; | 1838 | return 0; |
1836 | } | 1839 | } |
1837 | 1840 | ||
@@ -3279,7 +3282,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | |||
3279 | } | 3282 | } |
3280 | 3283 | ||
3281 | static int radio_s_tuner(struct file *file, void *priv, | 3284 | static int radio_s_tuner(struct file *file, void *priv, |
3282 | struct v4l2_tuner *t) | 3285 | const struct v4l2_tuner *t) |
3283 | { | 3286 | { |
3284 | struct bttv_fh *fh = priv; | 3287 | struct bttv_fh *fh = priv; |
3285 | struct bttv *btv = fh->btv; | 3288 | 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) | |||
809 | return 0; | 809 | return 0; |
810 | } | 810 | } |
811 | 811 | ||
812 | static int cx18_av_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 812 | static int cx18_av_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
813 | { | 813 | { |
814 | struct cx18_av_state *state = to_cx18_av_state(sd); | 814 | struct cx18_av_state *state = to_cx18_av_state(sd); |
815 | struct cx18 *cx = v4l2_get_subdevdata(sd); | 815 | 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) | |||
673 | return 0; | 673 | return 0; |
674 | } | 674 | } |
675 | 675 | ||
676 | static int cx18_s_tuner(struct file *file, void *fh, struct v4l2_tuner *vt) | 676 | static int cx18_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt) |
677 | { | 677 | { |
678 | struct cx18_open_id *id = fh2id(fh); | 678 | struct cx18_open_id *id = fh2id(fh); |
679 | struct cx18 *cx = id->cx; | 679 | 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, | |||
1280 | } | 1280 | } |
1281 | 1281 | ||
1282 | static int vidioc_s_tuner(struct file *file, void *priv, | 1282 | static int vidioc_s_tuner(struct file *file, void *priv, |
1283 | struct v4l2_tuner *t) | 1283 | const struct v4l2_tuner *t) |
1284 | { | 1284 | { |
1285 | struct cx23885_fh *fh = file->private_data; | 1285 | struct cx23885_fh *fh = file->private_data; |
1286 | struct cx23885_dev *dev = fh->dev; | 1286 | 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, | |||
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | static int vidioc_s_tuner(struct file *file, void *priv, | 1488 | static int vidioc_s_tuner(struct file *file, void *priv, |
1489 | struct v4l2_tuner *t) | 1489 | const struct v4l2_tuner *t) |
1490 | { | 1490 | { |
1491 | struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev; | 1491 | struct cx23885_dev *dev = ((struct cx23885_fh *)priv)->dev; |
1492 | 1492 | ||
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) | |||
1397 | return 0; | 1397 | return 0; |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | int cx25821_vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | 1400 | int cx25821_vidioc_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t) |
1401 | { | 1401 | { |
1402 | struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev; | 1402 | struct cx25821_dev *dev = ((struct cx25821_fh *)priv)->dev; |
1403 | struct cx25821_fh *fh = priv; | 1403 | 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, | |||
159 | extern int cx25821_vidioc_g_tuner(struct file *file, void *priv, | 159 | extern int cx25821_vidioc_g_tuner(struct file *file, void *priv, |
160 | struct v4l2_tuner *t); | 160 | struct v4l2_tuner *t); |
161 | extern int cx25821_vidioc_s_tuner(struct file *file, void *priv, | 161 | extern int cx25821_vidioc_s_tuner(struct file *file, void *priv, |
162 | struct v4l2_tuner *t); | 162 | const struct v4l2_tuner *t); |
163 | 163 | ||
164 | extern int cx25821_is_valid_width(u32 width, v4l2_std_id tvnorm); | 164 | extern int cx25821_is_valid_width(u32 width, v4l2_std_id tvnorm); |
165 | extern int cx25821_is_valid_height(u32 height, v4l2_std_id tvnorm); | 165 | 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, | |||
918 | } | 918 | } |
919 | 919 | ||
920 | static int vidioc_s_tuner (struct file *file, void *priv, | 920 | static int vidioc_s_tuner (struct file *file, void *priv, |
921 | struct v4l2_tuner *t) | 921 | const struct v4l2_tuner *t) |
922 | { | 922 | { |
923 | struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; | 923 | struct cx88_core *core = ((struct cx8802_fh *)priv)->dev->core; |
924 | 924 | ||
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, | |||
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | static int vidioc_s_tuner (struct file *file, void *priv, | 1291 | static int vidioc_s_tuner (struct file *file, void *priv, |
1292 | struct v4l2_tuner *t) | 1292 | const struct v4l2_tuner *t) |
1293 | { | 1293 | { |
1294 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; | 1294 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; |
1295 | 1295 | ||
@@ -1409,20 +1409,15 @@ static int radio_g_tuner (struct file *file, void *priv, | |||
1409 | return 0; | 1409 | return 0; |
1410 | } | 1410 | } |
1411 | 1411 | ||
1412 | /* FIXME: Should add a standard for radio */ | ||
1413 | |||
1414 | static int radio_s_tuner (struct file *file, void *priv, | 1412 | static int radio_s_tuner (struct file *file, void *priv, |
1415 | struct v4l2_tuner *t) | 1413 | const struct v4l2_tuner *t) |
1416 | { | 1414 | { |
1417 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; | 1415 | struct cx88_core *core = ((struct cx8800_fh *)priv)->dev->core; |
1418 | 1416 | ||
1419 | if (0 != t->index) | 1417 | if (0 != t->index) |
1420 | return -EINVAL; | 1418 | return -EINVAL; |
1421 | if (t->audmode > V4L2_TUNER_MODE_STEREO) | ||
1422 | t->audmode = V4L2_TUNER_MODE_STEREO; | ||
1423 | 1419 | ||
1424 | call_all(core, tuner, s_tuner, t); | 1420 | call_all(core, tuner, s_tuner, t); |
1425 | |||
1426 | return 0; | 1421 | return 0; |
1427 | } | 1422 | } |
1428 | 1423 | ||
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) | |||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
194 | 194 | ||
195 | static int subdev_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 195 | static int subdev_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
196 | { | 196 | { |
197 | struct ivtv *itv = sd_to_ivtv(sd); | 197 | struct ivtv *itv = sd_to_ivtv(sd); |
198 | u16 mask, data; | 198 | 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) | |||
1196 | return 0; | 1196 | return 0; |
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | static int ivtv_s_tuner(struct file *file, void *fh, struct v4l2_tuner *vt) | 1199 | static int ivtv_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *vt) |
1200 | { | 1200 | { |
1201 | struct ivtv_open_id *id = fh2id(fh); | 1201 | struct ivtv_open_id *id = fh2id(fh); |
1202 | struct ivtv *itv = id->itv; | 1202 | 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, | |||
2023 | } | 2023 | } |
2024 | 2024 | ||
2025 | static int saa7134_s_tuner(struct file *file, void *priv, | 2025 | static int saa7134_s_tuner(struct file *file, void *priv, |
2026 | struct v4l2_tuner *t) | 2026 | const struct v4l2_tuner *t) |
2027 | { | 2027 | { |
2028 | struct saa7134_fh *fh = priv; | 2028 | struct saa7134_fh *fh = priv; |
2029 | struct saa7134_dev *dev = fh->dev; | 2029 | struct saa7134_dev *dev = fh->dev; |
@@ -2347,7 +2347,7 @@ static int radio_g_tuner(struct file *file, void *priv, | |||
2347 | return 0; | 2347 | return 0; |
2348 | } | 2348 | } |
2349 | static int radio_s_tuner(struct file *file, void *priv, | 2349 | static int radio_s_tuner(struct file *file, void *priv, |
2350 | struct v4l2_tuner *t) | 2350 | const struct v4l2_tuner *t) |
2351 | { | 2351 | { |
2352 | struct saa7134_fh *fh = file->private_data; | 2352 | struct saa7134_fh *fh = file->private_data; |
2353 | struct saa7134_dev *dev = fh->dev; | 2353 | 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) | |||
560 | return call_all(dev, tuner, g_tuner, t); | 560 | return call_all(dev, tuner, g_tuner, t); |
561 | } | 561 | } |
562 | 562 | ||
563 | static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t) | 563 | static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *t) |
564 | { | 564 | { |
565 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 565 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
566 | struct mxb *mxb = (struct mxb *)dev->ext_priv; | 566 | 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, | |||
318 | } | 318 | } |
319 | 319 | ||
320 | static int vidioc_s_tuner(struct file *file, void *priv, | 320 | static int vidioc_s_tuner(struct file *file, void *priv, |
321 | struct v4l2_tuner *t) | 321 | const struct v4l2_tuner *t) |
322 | { | 322 | { |
323 | /* Update the A/V core */ | 323 | /* Update the A/V core */ |
324 | return 0; | 324 | 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, | |||
290 | } | 290 | } |
291 | 291 | ||
292 | static int vidioc_s_tuner(struct file *file, void *priv, | 292 | static int vidioc_s_tuner(struct file *file, void *priv, |
293 | struct v4l2_tuner *t) | 293 | const struct v4l2_tuner *t) |
294 | { | 294 | { |
295 | /* Update the A/V core */ | 295 | /* Update the A/V core */ |
296 | return 0; | 296 | 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) | |||
366 | return 0; | 366 | return 0; |
367 | } | 367 | } |
368 | 368 | ||
369 | static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *t) | 369 | static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *t) |
370 | { | 370 | { |
371 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; | 371 | struct saa7146_dev *dev = ((struct saa7146_fh *)fh)->dev; |
372 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; | 372 | struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; |