aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-04-18 04:38:56 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:49 -0400
commitf55a871241899ea2ecc85670d7c9a83e4de29637 (patch)
tree982361c8d79f3ec118e0193f8bf888337b922c39 /drivers/media
parent49844c291a02a8630215f779fa44b3198d0a4f5b (diff)
V4L/DVB (7716): pvrusb2: clean up global functions
This patch contains the following cleanups: - make the following needlessly global function static: - pvr2_hdw_set_cur_freq() - #if 0 the following unused global functions: - pvr2_hdw_get_state_name() - pvr2_hdw_get_debug_info_unlocked() - pvr2_hdw_get_debug_info_locked() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c48
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.h3
2 files changed, 1 insertions, 50 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index f907a56c587d..63d0af759ed8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1024,7 +1024,7 @@ unsigned long pvr2_hdw_get_cur_freq(struct pvr2_hdw *hdw)
1024 1024
1025/* Set the currently tuned frequency and account for all possible 1025/* Set the currently tuned frequency and account for all possible
1026 driver-core side effects of this action. */ 1026 driver-core side effects of this action. */
1027void pvr2_hdw_set_cur_freq(struct pvr2_hdw *hdw,unsigned long val) 1027static void pvr2_hdw_set_cur_freq(struct pvr2_hdw *hdw,unsigned long val)
1028{ 1028{
1029 if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) { 1029 if (hdw->input_val == PVR2_CVAL_INPUT_RADIO) {
1030 if (hdw->freqSelector) { 1030 if (hdw->freqSelector) {
@@ -1405,11 +1405,6 @@ int pvr2_hdw_untrip(struct pvr2_hdw *hdw)
1405} 1405}
1406 1406
1407 1407
1408const char *pvr2_hdw_get_state_name(unsigned int id)
1409{
1410 if (id >= ARRAY_SIZE(pvr2_state_names)) return NULL;
1411 return pvr2_state_names[id];
1412}
1413 1408
1414 1409
1415int pvr2_hdw_get_streaming(struct pvr2_hdw *hdw) 1410int pvr2_hdw_get_streaming(struct pvr2_hdw *hdw)
@@ -4150,47 +4145,6 @@ static void pvr2_hdw_state_sched(struct pvr2_hdw *hdw)
4150} 4145}
4151 4146
4152 4147
4153void pvr2_hdw_get_debug_info_unlocked(const struct pvr2_hdw *hdw,
4154 struct pvr2_hdw_debug_info *ptr)
4155{
4156 ptr->big_lock_held = hdw->big_lock_held;
4157 ptr->ctl_lock_held = hdw->ctl_lock_held;
4158 ptr->flag_disconnected = hdw->flag_disconnected;
4159 ptr->flag_init_ok = hdw->flag_init_ok;
4160 ptr->flag_ok = hdw->flag_ok;
4161 ptr->fw1_state = hdw->fw1_state;
4162 ptr->flag_decoder_missed = hdw->flag_decoder_missed;
4163 ptr->flag_tripped = hdw->flag_tripped;
4164 ptr->state_encoder_ok = hdw->state_encoder_ok;
4165 ptr->state_encoder_run = hdw->state_encoder_run;
4166 ptr->state_decoder_run = hdw->state_decoder_run;
4167 ptr->state_usbstream_run = hdw->state_usbstream_run;
4168 ptr->state_decoder_quiescent = hdw->state_decoder_quiescent;
4169 ptr->state_pipeline_config = hdw->state_pipeline_config;
4170 ptr->state_pipeline_req = hdw->state_pipeline_req;
4171 ptr->state_pipeline_pause = hdw->state_pipeline_pause;
4172 ptr->state_pipeline_idle = hdw->state_pipeline_idle;
4173 ptr->cmd_debug_state = hdw->cmd_debug_state;
4174 ptr->cmd_code = hdw->cmd_debug_code;
4175 ptr->cmd_debug_write_len = hdw->cmd_debug_write_len;
4176 ptr->cmd_debug_read_len = hdw->cmd_debug_read_len;
4177 ptr->cmd_debug_timeout = hdw->ctl_timeout_flag;
4178 ptr->cmd_debug_write_pend = hdw->ctl_write_pend_flag;
4179 ptr->cmd_debug_read_pend = hdw->ctl_read_pend_flag;
4180 ptr->cmd_debug_rstatus = hdw->ctl_read_urb->status;
4181 ptr->cmd_debug_wstatus = hdw->ctl_read_urb->status;
4182}
4183
4184
4185void pvr2_hdw_get_debug_info_locked(struct pvr2_hdw *hdw,
4186 struct pvr2_hdw_debug_info *ptr)
4187{
4188 LOCK_TAKE(hdw->ctl_lock); do {
4189 pvr2_hdw_get_debug_info_unlocked(hdw,ptr);
4190 } while(0); LOCK_GIVE(hdw->ctl_lock);
4191}
4192
4193
4194int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *dp) 4148int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *dp)
4195{ 4149{
4196 return pvr2_read_register(hdw,PVR2_GPIO_DIR,dp); 4150 return pvr2_read_register(hdw,PVR2_GPIO_DIR,dp);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h
index a868e52a73a3..74c2503f8e3f 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h
@@ -91,9 +91,6 @@ enum pvr2_v4l_type {
91/* Translate configuration enum to a string label */ 91/* Translate configuration enum to a string label */
92const char *pvr2_config_get_name(enum pvr2_config); 92const char *pvr2_config_get_name(enum pvr2_config);
93 93
94/* Translate a master state enum to a string label */
95const char *pvr2_hdw_get_state_name(unsigned int);
96
97struct pvr2_hdw; 94struct pvr2_hdw;
98 95
99/* Create and return a structure for interacting with the underlying 96/* Create and return a structure for interacting with the underlying