aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMárton Németh <nm127@freemail.hu>2010-03-01 01:31:02 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:46:25 -0400
commit278a58cf2ab6e690fa79ca7e0d466a0cb453296f (patch)
tree711f61ba396f65435c6ebf97509c9f67c2c412d7 /drivers/media
parent7b1fc72c2fdeb91565f4969397757ee938cce67e (diff)
V4L/DVB: tlg2300: make local variables and functions static
Make the local variables and functions static. Some of them are not exported by their symbol name but used trough other means. For example a pointer of the operation structure is passed through a function call. This will remove the following sparse warnings (see "make C=1"): * pd-video.c:20:5: warning: symbol 'usb_transfer_mode' was not declared. Should it be static? * pd-video.c:621:5: warning: symbol 'fire_all_urb' was not declared. Should it be static? * pd-video.c:881:5: warning: symbol 'vidioc_s_std' was not declared. Should it be static? * pd-video.c:1024:5: warning: symbol 'vidioc_g_audio' was not declared. Should it be static? * pd-video.c:1033:5: warning: symbol 'vidioc_s_audio' was not declared. Should it be static? * pd-video.c:1193:5: warning: symbol 'usb_transfer_stop' was not declared. Should it be static? * pd-video.c:1522:14: warning: symbol 'pd_video_poll' was not declared. Should it be static? * pd-video.c:1528:9: warning: symbol 'pd_video_read' was not declared. Should it be static? * pd-radio.c:164:5: warning: symbol 'tlg_fm_vidioc_g_tuner' was not declared. Should it be static? * pd-radio.c:206:5: warning: symbol 'fm_get_freq' was not declared. Should it be static? * pd-radio.c:249:5: warning: symbol 'fm_set_freq' was not declared. Should it be static? * pd-radio.c:261:5: warning: symbol 'tlg_fm_vidioc_g_ctrl' was not declared. Should it be static? * pd-radio.c:267:5: warning: symbol 'tlg_fm_vidioc_g_exts_ctrl' was not declared. Should it be static? * pd-radio.c:288:5: warning: symbol 'tlg_fm_vidioc_s_exts_ctrl' was not declared. Should it be static? * pd-radio.c:315:5: warning: symbol 'tlg_fm_vidioc_s_ctrl' was not declared. Should it be static? * pd-radio.c:321:5: warning: symbol 'tlg_fm_vidioc_queryctrl' was not declared. Should it be static? * pd-radio.c:340:5: warning: symbol 'tlg_fm_vidioc_querymenu' was not declared. Should it be static? * pd-main.c:58:12: warning: symbol 'firmware_name' was not declared. Should it be static? * pd-main.c:59:19: warning: symbol 'poseidon_driver' was not declared. Should it be static? Signed-off-by: Márton Németh <nm127@freemail.hu> Acked-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tlg2300/pd-main.c6
-rw-r--r--drivers/media/video/tlg2300/pd-radio.c21
-rw-r--r--drivers/media/video/tlg2300/pd-video.c16
3 files changed, 23 insertions, 20 deletions
diff --git a/drivers/media/video/tlg2300/pd-main.c b/drivers/media/video/tlg2300/pd-main.c
index 2cf0ebf9f28b..832b7c7b13d6 100644
--- a/drivers/media/video/tlg2300/pd-main.c
+++ b/drivers/media/video/tlg2300/pd-main.c
@@ -55,8 +55,8 @@ int debug_mode;
55module_param(debug_mode, int, 0644); 55module_param(debug_mode, int, 0644);
56MODULE_PARM_DESC(debug_mode, "0 = disable, 1 = enable, 2 = verbose"); 56MODULE_PARM_DESC(debug_mode, "0 = disable, 1 = enable, 2 = verbose");
57 57
58const char *firmware_name = "tlg2300_firmware.bin"; 58static const char *firmware_name = "tlg2300_firmware.bin";
59struct usb_driver poseidon_driver; 59static struct usb_driver poseidon_driver;
60static LIST_HEAD(pd_device_list); 60static LIST_HEAD(pd_device_list);
61 61
62/* 62/*
@@ -501,7 +501,7 @@ static void poseidon_disconnect(struct usb_interface *interface)
501 kref_put(&pd->kref, poseidon_delete); 501 kref_put(&pd->kref, poseidon_delete);
502} 502}
503 503
504struct usb_driver poseidon_driver = { 504static struct usb_driver poseidon_driver = {
505 .name = "poseidon", 505 .name = "poseidon",
506 .probe = poseidon_probe, 506 .probe = poseidon_probe,
507 .disconnect = poseidon_disconnect, 507 .disconnect = poseidon_disconnect,
diff --git a/drivers/media/video/tlg2300/pd-radio.c b/drivers/media/video/tlg2300/pd-radio.c
index 755766b15157..fae84c2a0c39 100644
--- a/drivers/media/video/tlg2300/pd-radio.c
+++ b/drivers/media/video/tlg2300/pd-radio.c
@@ -161,7 +161,8 @@ static const struct v4l2_file_operations poseidon_fm_fops = {
161 .ioctl = video_ioctl2, 161 .ioctl = video_ioctl2,
162}; 162};
163 163
164int tlg_fm_vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *vt) 164static int tlg_fm_vidioc_g_tuner(struct file *file, void *priv,
165 struct v4l2_tuner *vt)
165{ 166{
166 struct tuner_fm_sig_stat_s fm_stat = {}; 167 struct tuner_fm_sig_stat_s fm_stat = {};
167 int ret, status, count = 5; 168 int ret, status, count = 5;
@@ -203,7 +204,8 @@ int tlg_fm_vidioc_g_tuner(struct file *file, void *priv, struct v4l2_tuner *vt)
203 return 0; 204 return 0;
204} 205}
205 206
206int fm_get_freq(struct file *file, void *priv, struct v4l2_frequency *argp) 207static int fm_get_freq(struct file *file, void *priv,
208 struct v4l2_frequency *argp)
207{ 209{
208 struct poseidon *p = file->private_data; 210 struct poseidon *p = file->private_data;
209 211
@@ -246,7 +248,8 @@ error:
246 return ret; 248 return ret;
247} 249}
248 250
249int fm_set_freq(struct file *file, void *priv, struct v4l2_frequency *argp) 251static int fm_set_freq(struct file *file, void *priv,
252 struct v4l2_frequency *argp)
250{ 253{
251 struct poseidon *p = file->private_data; 254 struct poseidon *p = file->private_data;
252 255
@@ -258,13 +261,13 @@ int fm_set_freq(struct file *file, void *priv, struct v4l2_frequency *argp)
258 return set_frequency(p, argp->frequency); 261 return set_frequency(p, argp->frequency);
259} 262}
260 263
261int tlg_fm_vidioc_g_ctrl(struct file *file, void *priv, 264static int tlg_fm_vidioc_g_ctrl(struct file *file, void *priv,
262 struct v4l2_control *arg) 265 struct v4l2_control *arg)
263{ 266{
264 return 0; 267 return 0;
265} 268}
266 269
267int tlg_fm_vidioc_g_exts_ctrl(struct file *file, void *fh, 270static int tlg_fm_vidioc_g_exts_ctrl(struct file *file, void *fh,
268 struct v4l2_ext_controls *ctrls) 271 struct v4l2_ext_controls *ctrls)
269{ 272{
270 struct poseidon *p = file->private_data; 273 struct poseidon *p = file->private_data;
@@ -285,7 +288,7 @@ int tlg_fm_vidioc_g_exts_ctrl(struct file *file, void *fh,
285 return 0; 288 return 0;
286} 289}
287 290
288int tlg_fm_vidioc_s_exts_ctrl(struct file *file, void *fh, 291static int tlg_fm_vidioc_s_exts_ctrl(struct file *file, void *fh,
289 struct v4l2_ext_controls *ctrls) 292 struct v4l2_ext_controls *ctrls)
290{ 293{
291 int i; 294 int i;
@@ -312,13 +315,13 @@ int tlg_fm_vidioc_s_exts_ctrl(struct file *file, void *fh,
312 return 0; 315 return 0;
313} 316}
314 317
315int tlg_fm_vidioc_s_ctrl(struct file *file, void *priv, 318static int tlg_fm_vidioc_s_ctrl(struct file *file, void *priv,
316 struct v4l2_control *ctrl) 319 struct v4l2_control *ctrl)
317{ 320{
318 return 0; 321 return 0;
319} 322}
320 323
321int tlg_fm_vidioc_queryctrl(struct file *file, void *priv, 324static int tlg_fm_vidioc_queryctrl(struct file *file, void *priv,
322 struct v4l2_queryctrl *ctrl) 325 struct v4l2_queryctrl *ctrl)
323{ 326{
324 if (!(ctrl->id & V4L2_CTRL_FLAG_NEXT_CTRL)) 327 if (!(ctrl->id & V4L2_CTRL_FLAG_NEXT_CTRL))
@@ -337,7 +340,7 @@ int tlg_fm_vidioc_queryctrl(struct file *file, void *priv,
337 return -EINVAL; 340 return -EINVAL;
338} 341}
339 342
340int tlg_fm_vidioc_querymenu(struct file *file, void *fh, 343static int tlg_fm_vidioc_querymenu(struct file *file, void *fh,
341 struct v4l2_querymenu *qmenu) 344 struct v4l2_querymenu *qmenu)
342{ 345{
343 return v4l2_ctrl_query_menu(qmenu, NULL, NULL); 346 return v4l2_ctrl_query_menu(qmenu, NULL, NULL);
diff --git a/drivers/media/video/tlg2300/pd-video.c b/drivers/media/video/tlg2300/pd-video.c
index ed5cb1818adc..c750fd115ec4 100644
--- a/drivers/media/video/tlg2300/pd-video.c
+++ b/drivers/media/video/tlg2300/pd-video.c
@@ -18,7 +18,7 @@ static int pm_video_resume(struct poseidon *pd);
18#endif 18#endif
19static void iso_bubble_handler(struct work_struct *w); 19static void iso_bubble_handler(struct work_struct *w);
20 20
21int usb_transfer_mode; 21static int usb_transfer_mode;
22module_param(usb_transfer_mode, int, 0644); 22module_param(usb_transfer_mode, int, 0644);
23MODULE_PARM_DESC(usb_transfer_mode, "0 = Bulk, 1 = Isochronous"); 23MODULE_PARM_DESC(usb_transfer_mode, "0 = Bulk, 1 = Isochronous");
24 24
@@ -619,7 +619,7 @@ static int pd_buf_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,
619 return 0; 619 return 0;
620} 620}
621 621
622int fire_all_urb(struct video_data *video) 622static int fire_all_urb(struct video_data *video)
623{ 623{
624 int i, ret; 624 int i, ret;
625 625
@@ -879,7 +879,7 @@ out:
879 return ret; 879 return ret;
880} 880}
881 881
882int vidioc_s_std(struct file *file, void *fh, v4l2_std_id *norm) 882static int vidioc_s_std(struct file *file, void *fh, v4l2_std_id *norm)
883{ 883{
884 struct front_face *front = fh; 884 struct front_face *front = fh;
885 logs(front); 885 logs(front);
@@ -1022,7 +1022,7 @@ static int vidioc_enumaudio(struct file *file, void *fh, struct v4l2_audio *a)
1022 return 0; 1022 return 0;
1023} 1023}
1024 1024
1025int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a) 1025static int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
1026{ 1026{
1027 a->index = 0; 1027 a->index = 0;
1028 a->capability = V4L2_AUDCAP_STEREO; 1028 a->capability = V4L2_AUDCAP_STEREO;
@@ -1031,7 +1031,7 @@ int vidioc_g_audio(struct file *file, void *fh, struct v4l2_audio *a)
1031 return 0; 1031 return 0;
1032} 1032}
1033 1033
1034int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a) 1034static int vidioc_s_audio(struct file *file, void *fh, struct v4l2_audio *a)
1035{ 1035{
1036 return (0 == a->index) ? 0 : -EINVAL; 1036 return (0 == a->index) ? 0 : -EINVAL;
1037} 1037}
@@ -1191,7 +1191,7 @@ static int vidioc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *b)
1191} 1191}
1192 1192
1193/* Just stop the URBs, do not free the URBs */ 1193/* Just stop the URBs, do not free the URBs */
1194int usb_transfer_stop(struct video_data *video) 1194static int usb_transfer_stop(struct video_data *video)
1195{ 1195{
1196 if (video->is_streaming) { 1196 if (video->is_streaming) {
1197 int i; 1197 int i;
@@ -1520,13 +1520,13 @@ static int pd_video_mmap(struct file *file, struct vm_area_struct *vma)
1520 return videobuf_mmap_mapper(&front->q, vma); 1520 return videobuf_mmap_mapper(&front->q, vma);
1521} 1521}
1522 1522
1523unsigned int pd_video_poll(struct file *file, poll_table *table) 1523static unsigned int pd_video_poll(struct file *file, poll_table *table)
1524{ 1524{
1525 struct front_face *front = file->private_data; 1525 struct front_face *front = file->private_data;
1526 return videobuf_poll_stream(file, &front->q, table); 1526 return videobuf_poll_stream(file, &front->q, table);
1527} 1527}
1528 1528
1529ssize_t pd_video_read(struct file *file, char __user *buffer, 1529static ssize_t pd_video_read(struct file *file, char __user *buffer,
1530 size_t count, loff_t *ppos) 1530 size_t count, loff_t *ppos)
1531{ 1531{
1532 struct front_face *front = file->private_data; 1532 struct front_face *front = file->private_data;