diff options
Diffstat (limited to 'drivers')
48 files changed, 65 insertions, 72 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index f4339ed8f2e5..234b7c63d087 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c | |||
@@ -1881,7 +1881,7 @@ static int cx25840_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
1881 | return 0; | 1881 | return 0; |
1882 | } | 1882 | } |
1883 | 1883 | ||
1884 | static int cx25840_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1884 | static int cx25840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
1885 | { | 1885 | { |
1886 | struct cx25840_state *state = to_state(sd); | 1886 | struct cx25840_state *state = to_state(sd); |
1887 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 1887 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
diff --git a/drivers/media/i2c/msp3400-driver.c b/drivers/media/i2c/msp3400-driver.c index 77053ba09627..54a9dd394f45 100644 --- a/drivers/media/i2c/msp3400-driver.c +++ b/drivers/media/i2c/msp3400-driver.c | |||
@@ -535,7 +535,7 @@ static int msp_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
535 | return 0; | 535 | return 0; |
536 | } | 536 | } |
537 | 537 | ||
538 | static int msp_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 538 | static int msp_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
539 | { | 539 | { |
540 | struct msp_state *state = to_state(sd); | 540 | struct msp_state *state = to_state(sd); |
541 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 541 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
diff --git a/drivers/media/i2c/saa6588.c b/drivers/media/i2c/saa6588.c index 0caac50d7cf4..b4e1ccbd87ec 100644 --- a/drivers/media/i2c/saa6588.c +++ b/drivers/media/i2c/saa6588.c | |||
@@ -435,7 +435,7 @@ static int saa6588_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
435 | return 0; | 435 | return 0; |
436 | } | 436 | } |
437 | 437 | ||
438 | static int saa6588_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 438 | static int saa6588_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
439 | { | 439 | { |
440 | struct saa6588 *s = to_saa6588(sd); | 440 | struct saa6588 *s = to_saa6588(sd); |
441 | 441 | ||
diff --git a/drivers/media/i2c/saa717x.c b/drivers/media/i2c/saa717x.c index 1e84466515aa..5608b937f8b2 100644 --- a/drivers/media/i2c/saa717x.c +++ b/drivers/media/i2c/saa717x.c | |||
@@ -1113,7 +1113,7 @@ static int saa717x_s_stream(struct v4l2_subdev *sd, int enable) | |||
1113 | } | 1113 | } |
1114 | 1114 | ||
1115 | /* change audio mode */ | 1115 | /* change audio mode */ |
1116 | static int saa717x_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1116 | static int saa717x_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
1117 | { | 1117 | { |
1118 | struct saa717x_state *decoder = to_state(sd); | 1118 | struct saa717x_state *decoder = to_state(sd); |
1119 | int audio_mode; | 1119 | int audio_mode; |
diff --git a/drivers/media/i2c/tda9840.c b/drivers/media/i2c/tda9840.c index 3d7ddd93282d..01441e35d88b 100644 --- a/drivers/media/i2c/tda9840.c +++ b/drivers/media/i2c/tda9840.c | |||
@@ -87,7 +87,7 @@ static int tda9840_status(struct v4l2_subdev *sd) | |||
87 | return byte & 0x60; | 87 | return byte & 0x60; |
88 | } | 88 | } |
89 | 89 | ||
90 | static int tda9840_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *t) | 90 | static int tda9840_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *t) |
91 | { | 91 | { |
92 | int stat = tda9840_status(sd); | 92 | int stat = tda9840_status(sd); |
93 | int byte; | 93 | int byte; |
diff --git a/drivers/media/i2c/tvaudio.c b/drivers/media/i2c/tvaudio.c index 4b12c5188075..b72a59d3216a 100644 --- a/drivers/media/i2c/tvaudio.c +++ b/drivers/media/i2c/tvaudio.c | |||
@@ -1761,7 +1761,7 @@ static int tvaudio_s_routing(struct v4l2_subdev *sd, | |||
1761 | return 0; | 1761 | return 0; |
1762 | } | 1762 | } |
1763 | 1763 | ||
1764 | static int tvaudio_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1764 | static int tvaudio_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
1765 | { | 1765 | { |
1766 | struct CHIPSTATE *chip = to_state(sd); | 1766 | struct CHIPSTATE *chip = to_state(sd); |
1767 | struct CHIPDESC *desc = chip->desc; | 1767 | struct CHIPDESC *desc = chip->desc; |
diff --git a/drivers/media/i2c/vp27smpx.c b/drivers/media/i2c/vp27smpx.c index 7cfbc9d94a48..e71f139695af 100644 --- a/drivers/media/i2c/vp27smpx.c +++ b/drivers/media/i2c/vp27smpx.c | |||
@@ -90,7 +90,7 @@ static int vp27smpx_s_std(struct v4l2_subdev *sd, v4l2_std_id norm) | |||
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | static int vp27smpx_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 93 | static int vp27smpx_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
94 | { | 94 | { |
95 | struct vp27smpx_state *state = to_state(sd); | 95 | struct vp27smpx_state *state = to_state(sd); |
96 | 96 | ||
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; |
diff --git a/drivers/media/radio/dsbr100.c b/drivers/media/radio/dsbr100.c index e140a725820d..142c2ee64d31 100644 --- a/drivers/media/radio/dsbr100.c +++ b/drivers/media/radio/dsbr100.c | |||
@@ -208,7 +208,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
208 | } | 208 | } |
209 | 209 | ||
210 | static int vidioc_s_tuner(struct file *file, void *priv, | 210 | static int vidioc_s_tuner(struct file *file, void *priv, |
211 | struct v4l2_tuner *v) | 211 | const struct v4l2_tuner *v) |
212 | { | 212 | { |
213 | return v->index ? -EINVAL : 0; | 213 | return v->index ? -EINVAL : 0; |
214 | } | 214 | } |
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 59be293cbf42..545c04cf7226 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c | |||
@@ -390,7 +390,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
390 | } | 390 | } |
391 | 391 | ||
392 | static int vidioc_s_tuner(struct file *file, void *priv, | 392 | static int vidioc_s_tuner(struct file *file, void *priv, |
393 | struct v4l2_tuner *v) | 393 | const struct v4l2_tuner *v) |
394 | { | 394 | { |
395 | return v->index ? -EINVAL : 0; | 395 | return v->index ? -EINVAL : 0; |
396 | } | 396 | } |
diff --git a/drivers/media/radio/radio-isa.c b/drivers/media/radio/radio-isa.c index 0c1e27b13e69..6ff350831d56 100644 --- a/drivers/media/radio/radio-isa.c +++ b/drivers/media/radio/radio-isa.c | |||
@@ -87,7 +87,7 @@ static int radio_isa_g_tuner(struct file *file, void *priv, | |||
87 | } | 87 | } |
88 | 88 | ||
89 | static int radio_isa_s_tuner(struct file *file, void *priv, | 89 | static int radio_isa_s_tuner(struct file *file, void *priv, |
90 | struct v4l2_tuner *v) | 90 | const struct v4l2_tuner *v) |
91 | { | 91 | { |
92 | struct radio_isa_card *isa = video_drvdata(file); | 92 | struct radio_isa_card *isa = video_drvdata(file); |
93 | const struct radio_isa_ops *ops = isa->drv->ops; | 93 | const struct radio_isa_ops *ops = isa->drv->ops; |
diff --git a/drivers/media/radio/radio-ma901.c b/drivers/media/radio/radio-ma901.c index 7f85c6f98009..18320c2c4607 100644 --- a/drivers/media/radio/radio-ma901.c +++ b/drivers/media/radio/radio-ma901.c | |||
@@ -239,7 +239,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
239 | 239 | ||
240 | /* vidioc_s_tuner - set tuner attributes */ | 240 | /* vidioc_s_tuner - set tuner attributes */ |
241 | static int vidioc_s_tuner(struct file *file, void *priv, | 241 | static int vidioc_s_tuner(struct file *file, void *priv, |
242 | struct v4l2_tuner *v) | 242 | const struct v4l2_tuner *v) |
243 | { | 243 | { |
244 | struct ma901radio_device *radio = video_drvdata(file); | 244 | struct ma901radio_device *radio = video_drvdata(file); |
245 | 245 | ||
diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c index 2b8d31d8330b..a7e93d7477dd 100644 --- a/drivers/media/radio/radio-miropcm20.c +++ b/drivers/media/radio/radio-miropcm20.c | |||
@@ -103,16 +103,18 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
103 | } | 103 | } |
104 | 104 | ||
105 | static int vidioc_s_tuner(struct file *file, void *priv, | 105 | static int vidioc_s_tuner(struct file *file, void *priv, |
106 | struct v4l2_tuner *v) | 106 | const struct v4l2_tuner *v) |
107 | { | 107 | { |
108 | struct pcm20 *dev = video_drvdata(file); | 108 | struct pcm20 *dev = video_drvdata(file); |
109 | 109 | ||
110 | if (v->index) | 110 | if (v->index) |
111 | return -EINVAL; | 111 | return -EINVAL; |
112 | if (v->audmode > V4L2_TUNER_MODE_STEREO) | 112 | if (v->audmode > V4L2_TUNER_MODE_STEREO) |
113 | v->audmode = V4L2_TUNER_MODE_STEREO; | 113 | dev->audmode = V4L2_TUNER_MODE_STEREO; |
114 | else | ||
115 | dev->audmode = v->audmode; | ||
114 | snd_aci_cmd(dev->aci, ACI_SET_TUNERMONO, | 116 | snd_aci_cmd(dev->aci, ACI_SET_TUNERMONO, |
115 | v->audmode == V4L2_TUNER_MODE_MONO, -1); | 117 | dev->audmode == V4L2_TUNER_MODE_MONO, -1); |
116 | return 0; | 118 | return 0; |
117 | } | 119 | } |
118 | 120 | ||
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index f9cdd8b96add..2ce75d1564dc 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
@@ -305,7 +305,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
305 | 305 | ||
306 | /* vidioc_s_tuner - set tuner attributes */ | 306 | /* vidioc_s_tuner - set tuner attributes */ |
307 | static int vidioc_s_tuner(struct file *file, void *priv, | 307 | static int vidioc_s_tuner(struct file *file, void *priv, |
308 | struct v4l2_tuner *v) | 308 | const struct v4l2_tuner *v) |
309 | { | 309 | { |
310 | struct amradio_device *radio = video_drvdata(file); | 310 | struct amradio_device *radio = video_drvdata(file); |
311 | 311 | ||
diff --git a/drivers/media/radio/radio-sf16fmi.c b/drivers/media/radio/radio-sf16fmi.c index 6142b5b3e81b..adfcc61bdf0b 100644 --- a/drivers/media/radio/radio-sf16fmi.c +++ b/drivers/media/radio/radio-sf16fmi.c | |||
@@ -145,7 +145,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
145 | } | 145 | } |
146 | 146 | ||
147 | static int vidioc_s_tuner(struct file *file, void *priv, | 147 | static int vidioc_s_tuner(struct file *file, void *priv, |
148 | struct v4l2_tuner *v) | 148 | const struct v4l2_tuner *v) |
149 | { | 149 | { |
150 | return v->index ? -EINVAL : 0; | 150 | return v->index ? -EINVAL : 0; |
151 | } | 151 | } |
diff --git a/drivers/media/radio/radio-tea5764.c b/drivers/media/radio/radio-tea5764.c index 893842874d89..38d563d62595 100644 --- a/drivers/media/radio/radio-tea5764.c +++ b/drivers/media/radio/radio-tea5764.c | |||
@@ -339,7 +339,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
339 | } | 339 | } |
340 | 340 | ||
341 | static int vidioc_s_tuner(struct file *file, void *priv, | 341 | static int vidioc_s_tuner(struct file *file, void *priv, |
342 | struct v4l2_tuner *v) | 342 | const struct v4l2_tuner *v) |
343 | { | 343 | { |
344 | struct tea5764_device *radio = video_drvdata(file); | 344 | struct tea5764_device *radio = video_drvdata(file); |
345 | 345 | ||
diff --git a/drivers/media/radio/radio-tea5777.c b/drivers/media/radio/radio-tea5777.c index fcd7c195e0c5..e2455970725a 100644 --- a/drivers/media/radio/radio-tea5777.c +++ b/drivers/media/radio/radio-tea5777.c | |||
@@ -336,7 +336,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
336 | } | 336 | } |
337 | 337 | ||
338 | static int vidioc_s_tuner(struct file *file, void *priv, | 338 | static int vidioc_s_tuner(struct file *file, void *priv, |
339 | struct v4l2_tuner *v) | 339 | const struct v4l2_tuner *v) |
340 | { | 340 | { |
341 | struct radio_tea5777 *tea = video_drvdata(file); | 341 | struct radio_tea5777 *tea = video_drvdata(file); |
342 | u32 orig_audmode = tea->audmode; | 342 | u32 orig_audmode = tea->audmode; |
@@ -344,10 +344,9 @@ static int vidioc_s_tuner(struct file *file, void *priv, | |||
344 | if (v->index) | 344 | if (v->index) |
345 | return -EINVAL; | 345 | return -EINVAL; |
346 | 346 | ||
347 | if (v->audmode > V4L2_TUNER_MODE_STEREO) | ||
348 | v->audmode = V4L2_TUNER_MODE_STEREO; | ||
349 | |||
350 | tea->audmode = v->audmode; | 347 | tea->audmode = v->audmode; |
348 | if (tea->audmode > V4L2_TUNER_MODE_STEREO) | ||
349 | tea->audmode = V4L2_TUNER_MODE_STEREO; | ||
351 | 350 | ||
352 | if (tea->audmode != orig_audmode && tea->band == BAND_FM) | 351 | if (tea->audmode != orig_audmode && tea->band == BAND_FM) |
353 | return radio_tea5777_set_freq(tea); | 352 | return radio_tea5777_set_freq(tea); |
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 1712c05c113d..bb7b143b65d1 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -56,7 +56,7 @@ static int timbradio_vidioc_g_tuner(struct file *file, void *priv, | |||
56 | } | 56 | } |
57 | 57 | ||
58 | static int timbradio_vidioc_s_tuner(struct file *file, void *priv, | 58 | static int timbradio_vidioc_s_tuner(struct file *file, void *priv, |
59 | struct v4l2_tuner *v) | 59 | const struct v4l2_tuner *v) |
60 | { | 60 | { |
61 | struct timbradio *tr = video_drvdata(file); | 61 | struct timbradio *tr = video_drvdata(file); |
62 | return v4l2_subdev_call(tr->sd_tuner, tuner, s_tuner, v); | 62 | return v4l2_subdev_call(tr->sd_tuner, tuner, s_tuner, v); |
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 9a02fee904bf..97c2c18803ef 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
@@ -1559,7 +1559,7 @@ out: | |||
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | static int wl1273_fm_vidioc_s_tuner(struct file *file, void *priv, | 1561 | static int wl1273_fm_vidioc_s_tuner(struct file *file, void *priv, |
1562 | struct v4l2_tuner *tuner) | 1562 | const struct v4l2_tuner *tuner) |
1563 | { | 1563 | { |
1564 | struct wl1273_device *radio = video_get_drvdata(video_devdata(file)); | 1564 | struct wl1273_device *radio = video_get_drvdata(video_devdata(file)); |
1565 | struct wl1273_core *core = radio->core; | 1565 | struct wl1273_core *core = radio->core; |
diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c index 5708633a3d78..5c57e5b0f949 100644 --- a/drivers/media/radio/si470x/radio-si470x-common.c +++ b/drivers/media/radio/si470x/radio-si470x-common.c | |||
@@ -636,7 +636,7 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv, | |||
636 | * si470x_vidioc_s_tuner - set tuner attributes | 636 | * si470x_vidioc_s_tuner - set tuner attributes |
637 | */ | 637 | */ |
638 | static int si470x_vidioc_s_tuner(struct file *file, void *priv, | 638 | static int si470x_vidioc_s_tuner(struct file *file, void *priv, |
639 | struct v4l2_tuner *tuner) | 639 | const struct v4l2_tuner *tuner) |
640 | { | 640 | { |
641 | struct si470x_device *radio = video_drvdata(file); | 641 | struct si470x_device *radio = video_drvdata(file); |
642 | 642 | ||
diff --git a/drivers/media/radio/tef6862.c b/drivers/media/radio/tef6862.c index 867395568f92..82c6c9475d7c 100644 --- a/drivers/media/radio/tef6862.c +++ b/drivers/media/radio/tef6862.c | |||
@@ -96,7 +96,7 @@ static int tef6862_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v) | |||
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | static int tef6862_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v) | 99 | static int tef6862_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *v) |
100 | { | 100 | { |
101 | return v->index ? -EINVAL : 0; | 101 | return v->index ? -EINVAL : 0; |
102 | } | 102 | } |
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c index 0183956d9b02..5dec323f4247 100644 --- a/drivers/media/radio/wl128x/fmdrv_v4l2.c +++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c | |||
@@ -331,7 +331,7 @@ static int fm_v4l2_vidioc_g_tuner(struct file *file, void *priv, | |||
331 | * Should we set other tuner attributes, too? | 331 | * Should we set other tuner attributes, too? |
332 | */ | 332 | */ |
333 | static int fm_v4l2_vidioc_s_tuner(struct file *file, void *priv, | 333 | static int fm_v4l2_vidioc_s_tuner(struct file *file, void *priv, |
334 | struct v4l2_tuner *tuner) | 334 | const struct v4l2_tuner *tuner) |
335 | { | 335 | { |
336 | struct fmdev *fmdev = video_drvdata(file); | 336 | struct fmdev *fmdev = video_drvdata(file); |
337 | u16 aud_mode; | 337 | u16 aud_mode; |
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index b1d6b034e1a1..11316f2f2e42 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
@@ -1508,7 +1508,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | |||
1508 | } | 1508 | } |
1509 | 1509 | ||
1510 | static int vidioc_s_tuner(struct file *file, void *priv, | 1510 | static int vidioc_s_tuner(struct file *file, void *priv, |
1511 | struct v4l2_tuner *t) | 1511 | const struct v4l2_tuner *t) |
1512 | { | 1512 | { |
1513 | struct au0828_fh *fh = priv; | 1513 | struct au0828_fh *fh = priv; |
1514 | struct au0828_dev *dev = fh->dev; | 1514 | struct au0828_dev *dev = fh->dev; |
@@ -1516,8 +1516,6 @@ static int vidioc_s_tuner(struct file *file, void *priv, | |||
1516 | if (t->index != 0) | 1516 | if (t->index != 0) |
1517 | return -EINVAL; | 1517 | return -EINVAL; |
1518 | 1518 | ||
1519 | t->type = V4L2_TUNER_ANALOG_TV; | ||
1520 | |||
1521 | if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) | 1519 | if (dev->dvb.frontend && dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl) |
1522 | dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1); | 1520 | dev->dvb.frontend->ops.analog_ops.i2c_gate_ctrl(dev->dvb.frontend, 1); |
1523 | 1521 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 96f65318d788..53020a7e01fe 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -1139,7 +1139,7 @@ int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | |||
1139 | return 0; | 1139 | return 0; |
1140 | } | 1140 | } |
1141 | 1141 | ||
1142 | int cx231xx_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | 1142 | int cx231xx_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t) |
1143 | { | 1143 | { |
1144 | struct cx231xx_fh *fh = priv; | 1144 | struct cx231xx_fh *fh = priv; |
1145 | struct cx231xx *dev = fh->dev; | 1145 | struct cx231xx *dev = fh->dev; |
@@ -1808,7 +1808,7 @@ static int radio_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | |||
1808 | 1808 | ||
1809 | return 0; | 1809 | return 0; |
1810 | } | 1810 | } |
1811 | static int radio_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t) | 1811 | static int radio_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t) |
1812 | { | 1812 | { |
1813 | struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev; | 1813 | struct cx231xx *dev = ((struct cx231xx_fh *)priv)->dev; |
1814 | 1814 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx.h b/drivers/media/usb/cx231xx/cx231xx.h index 6f701e9bec44..2f9faee539cb 100644 --- a/drivers/media/usb/cx231xx/cx231xx.h +++ b/drivers/media/usb/cx231xx/cx231xx.h | |||
@@ -936,7 +936,7 @@ void cx231xx_close_extension(struct cx231xx *dev); | |||
936 | int cx231xx_querycap(struct file *file, void *priv, | 936 | int cx231xx_querycap(struct file *file, void *priv, |
937 | struct v4l2_capability *cap); | 937 | struct v4l2_capability *cap); |
938 | int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t); | 938 | int cx231xx_g_tuner(struct file *file, void *priv, struct v4l2_tuner *t); |
939 | int cx231xx_s_tuner(struct file *file, void *priv, struct v4l2_tuner *t); | 939 | int cx231xx_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *t); |
940 | int cx231xx_g_frequency(struct file *file, void *priv, | 940 | int cx231xx_g_frequency(struct file *file, void *priv, |
941 | struct v4l2_frequency *f); | 941 | struct v4l2_frequency *f); |
942 | int cx231xx_s_frequency(struct file *file, void *priv, | 942 | int cx231xx_s_frequency(struct file *file, void *priv, |
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index af79089a0169..3ef696d36c7e 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -1195,7 +1195,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
1195 | } | 1195 | } |
1196 | 1196 | ||
1197 | static int vidioc_s_tuner(struct file *file, void *priv, | 1197 | static int vidioc_s_tuner(struct file *file, void *priv, |
1198 | struct v4l2_tuner *t) | 1198 | const struct v4l2_tuner *t) |
1199 | { | 1199 | { |
1200 | struct em28xx_fh *fh = priv; | 1200 | struct em28xx_fh *fh = priv; |
1201 | struct em28xx *dev = fh->dev; | 1201 | struct em28xx *dev = fh->dev; |
@@ -1493,7 +1493,7 @@ static int radio_g_tuner(struct file *file, void *priv, | |||
1493 | } | 1493 | } |
1494 | 1494 | ||
1495 | static int radio_s_tuner(struct file *file, void *priv, | 1495 | static int radio_s_tuner(struct file *file, void *priv, |
1496 | struct v4l2_tuner *t) | 1496 | const struct v4l2_tuner *t) |
1497 | { | 1497 | { |
1498 | struct em28xx *dev = ((struct em28xx_fh *)priv)->dev; | 1498 | struct em28xx *dev = ((struct em28xx_fh *)priv)->dev; |
1499 | 1499 | ||
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c index 75657c6dc013..0f729c92e3cf 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | |||
@@ -352,7 +352,7 @@ static int pvr2_g_tuner(struct file *file, void *priv, struct v4l2_tuner *vt) | |||
352 | return pvr2_hdw_get_tuner_status(hdw, vt); | 352 | return pvr2_hdw_get_tuner_status(hdw, vt); |
353 | } | 353 | } |
354 | 354 | ||
355 | static int pvr2_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt) | 355 | static int pvr2_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *vt) |
356 | { | 356 | { |
357 | struct pvr2_v4l2_fh *fh = file->private_data; | 357 | struct pvr2_v4l2_fh *fh = file->private_data; |
358 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; | 358 | struct pvr2_hdw *hdw = fh->channel.mc_head->hdw; |
diff --git a/drivers/media/usb/tlg2300/pd-radio.c b/drivers/media/usb/tlg2300/pd-radio.c index 8b1daf1f1e99..ea6070ba835e 100644 --- a/drivers/media/usb/tlg2300/pd-radio.c +++ b/drivers/media/usb/tlg2300/pd-radio.c | |||
@@ -283,7 +283,7 @@ static int tlg_fm_s_ctrl(struct v4l2_ctrl *ctrl) | |||
283 | return -EINVAL; | 283 | return -EINVAL; |
284 | } | 284 | } |
285 | 285 | ||
286 | static int vidioc_s_tuner(struct file *file, void *priv, struct v4l2_tuner *vt) | 286 | static int vidioc_s_tuner(struct file *file, void *priv, const struct v4l2_tuner *vt) |
287 | { | 287 | { |
288 | return vt->index > 0 ? -EINVAL : 0; | 288 | return vt->index > 0 ? -EINVAL : 0; |
289 | } | 289 | } |
diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c index 8ef7c8c419f7..9595309caed4 100644 --- a/drivers/media/usb/tlg2300/pd-video.c +++ b/drivers/media/usb/tlg2300/pd-video.c | |||
@@ -1031,7 +1031,7 @@ static int pd_vidioc_s_tuner(struct poseidon *pd, int index) | |||
1031 | return ret; | 1031 | return ret; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static int vidioc_s_tuner(struct file *file, void *fh, struct v4l2_tuner *a) | 1034 | static int vidioc_s_tuner(struct file *file, void *fh, const struct v4l2_tuner *a) |
1035 | { | 1035 | { |
1036 | struct front_face *front = fh; | 1036 | struct front_face *front = fh; |
1037 | struct poseidon *pd = front->pd; | 1037 | struct poseidon *pd = front->pd; |
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 49df7537fa63..b4618d7d9c4b 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c | |||
@@ -1215,7 +1215,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
1215 | } | 1215 | } |
1216 | 1216 | ||
1217 | static int vidioc_s_tuner(struct file *file, void *priv, | 1217 | static int vidioc_s_tuner(struct file *file, void *priv, |
1218 | struct v4l2_tuner *t) | 1218 | const struct v4l2_tuner *t) |
1219 | { | 1219 | { |
1220 | struct tm6000_fh *fh = priv; | 1220 | struct tm6000_fh *fh = priv; |
1221 | struct tm6000_core *dev = fh->dev; | 1221 | struct tm6000_core *dev = fh->dev; |
@@ -1293,18 +1293,14 @@ static int radio_g_tuner(struct file *file, void *priv, | |||
1293 | } | 1293 | } |
1294 | 1294 | ||
1295 | static int radio_s_tuner(struct file *file, void *priv, | 1295 | static int radio_s_tuner(struct file *file, void *priv, |
1296 | struct v4l2_tuner *t) | 1296 | const struct v4l2_tuner *t) |
1297 | { | 1297 | { |
1298 | struct tm6000_fh *fh = file->private_data; | 1298 | struct tm6000_fh *fh = file->private_data; |
1299 | struct tm6000_core *dev = fh->dev; | 1299 | struct tm6000_core *dev = fh->dev; |
1300 | 1300 | ||
1301 | if (0 != t->index) | 1301 | if (0 != t->index) |
1302 | return -EINVAL; | 1302 | return -EINVAL; |
1303 | if (t->audmode > V4L2_TUNER_MODE_STEREO) | ||
1304 | t->audmode = V4L2_TUNER_MODE_STEREO; | ||
1305 | |||
1306 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t); | 1303 | v4l2_device_call_all(&dev->v4l2_dev, 0, tuner, s_tuner, t); |
1307 | |||
1308 | return 0; | 1304 | return 0; |
1309 | } | 1305 | } |
1310 | 1306 | ||
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c index b66844564144..874cfec0b8db 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c | |||
@@ -628,7 +628,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
628 | } | 628 | } |
629 | 629 | ||
630 | static int vidioc_s_tuner(struct file *file, void *priv, | 630 | static int vidioc_s_tuner(struct file *file, void *priv, |
631 | struct v4l2_tuner *vt) | 631 | const struct v4l2_tuner *vt) |
632 | { | 632 | { |
633 | struct usb_usbvision *usbvision = video_drvdata(file); | 633 | struct usb_usbvision *usbvision = video_drvdata(file); |
634 | 634 | ||
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 279f65efe9ba..f775768d088d 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c | |||
@@ -1233,7 +1233,7 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
1233 | * Note: vt->type should be initialized before calling it. | 1233 | * Note: vt->type should be initialized before calling it. |
1234 | * This is done by either video_ioctl2 or by the bridge driver. | 1234 | * This is done by either video_ioctl2 or by the bridge driver. |
1235 | */ | 1235 | */ |
1236 | static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | 1236 | static int tuner_s_tuner(struct v4l2_subdev *sd, const struct v4l2_tuner *vt) |
1237 | { | 1237 | { |
1238 | struct tuner *t = to_tuner(sd); | 1238 | struct tuner *t = to_tuner(sd); |
1239 | 1239 | ||
diff --git a/drivers/staging/media/go7007/go7007-v4l2.c b/drivers/staging/media/go7007/go7007-v4l2.c index 1288f1cab129..4e477f3b78f3 100644 --- a/drivers/staging/media/go7007/go7007-v4l2.c +++ b/drivers/staging/media/go7007/go7007-v4l2.c | |||
@@ -1242,7 +1242,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, | |||
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | static int vidioc_s_tuner(struct file *file, void *priv, | 1244 | static int vidioc_s_tuner(struct file *file, void *priv, |
1245 | struct v4l2_tuner *t) | 1245 | const struct v4l2_tuner *t) |
1246 | { | 1246 | { |
1247 | struct go7007 *go = ((struct go7007_file *) priv)->go; | 1247 | struct go7007 *go = ((struct go7007_file *) priv)->go; |
1248 | 1248 | ||