aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-15 05:10:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-24 05:31:23 -0400
commit2f73c7c582a685b3198b974cd6d964d0338f8ab5 (patch)
treed95d1dd1665bd59d09dfd7455c8f096a6fb29352 /drivers/media/radio
parentb530a447bb588fdf43fdf4eb909e4ee1921d47ac (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/radio')
-rw-r--r--drivers/media/radio/dsbr100.c2
-rw-r--r--drivers/media/radio/radio-cadet.c2
-rw-r--r--drivers/media/radio/radio-isa.c2
-rw-r--r--drivers/media/radio/radio-ma901.c2
-rw-r--r--drivers/media/radio/radio-miropcm20.c8
-rw-r--r--drivers/media/radio/radio-mr800.c2
-rw-r--r--drivers/media/radio/radio-sf16fmi.c2
-rw-r--r--drivers/media/radio/radio-tea5764.c2
-rw-r--r--drivers/media/radio/radio-tea5777.c7
-rw-r--r--drivers/media/radio/radio-timb.c2
-rw-r--r--drivers/media/radio/radio-wl1273.c2
-rw-r--r--drivers/media/radio/si470x/radio-si470x-common.c2
-rw-r--r--drivers/media/radio/tef6862.c2
-rw-r--r--drivers/media/radio/wl128x/fmdrv_v4l2.c2
14 files changed, 20 insertions, 19 deletions
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
210static int vidioc_s_tuner(struct file *file, void *priv, 210static 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
392static int vidioc_s_tuner(struct file *file, void *priv, 392static 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
89static int radio_isa_s_tuner(struct file *file, void *priv, 89static 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 */
241static int vidioc_s_tuner(struct file *file, void *priv, 241static 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
105static int vidioc_s_tuner(struct file *file, void *priv, 105static 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 */
307static int vidioc_s_tuner(struct file *file, void *priv, 307static 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
147static int vidioc_s_tuner(struct file *file, void *priv, 147static 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
341static int vidioc_s_tuner(struct file *file, void *priv, 341static 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
338static int vidioc_s_tuner(struct file *file, void *priv, 338static 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
58static int timbradio_vidioc_s_tuner(struct file *file, void *priv, 58static 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
1561static int wl1273_fm_vidioc_s_tuner(struct file *file, void *priv, 1561static 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 */
638static int si470x_vidioc_s_tuner(struct file *file, void *priv, 638static 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
99static int tef6862_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *v) 99static 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 */
333static int fm_v4l2_vidioc_s_tuner(struct file *file, void *priv, 333static 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;