summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-06-30 11:30:20 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-30 11:30:20 -0300
commit7c9fb6798a34120f38474485b91f47e8b99b3307 (patch)
tree6dd450488a01295821b013921af64bda65ca0116 /linux/drivers/media/video/pvrusb2/pvrusb2-io.c
parent2113fdfbc030a48c2490ef578e8c4e17f1eaa440 (diff)
downloadmediapointer-dvb-s2-7c9fb6798a34120f38474485b91f47e8b99b3307.tar.gz
mediapointer-dvb-s2-7c9fb6798a34120f38474485b91f47e8b99b3307.tar.bz2
Pvrusb2/: possible cleanups
From: Adrian Bunk <bunk@stusta.de> This patch contains the following possible cleanups: - make needlessly global code static - #if 0 unused global functions Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2/pvrusb2-io.c')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-io.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
index cb0ca6376..b2ace5403 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -113,7 +113,7 @@ struct pvr2_buffer {
struct urb *purb;
};
-const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
+static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
{
switch (st) {
case pvr2_buffer_state_none: return "none";
@@ -124,7 +124,8 @@ const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
return "unknown";
}
-void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
+#ifdef SANITY_CHECK_BUFFERS
+static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
{
pvr2_trace(PVR2_TRACE_INFO,
"buffer%s%s %p state=%s id=%d status=%d"
@@ -139,6 +140,7 @@ void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
(bp ? bp->purb : 0),
(bp ? bp->signature : 0));
}
+#endif /* SANITY_CHECK_BUFFERS */
static void pvr2_buffer_remove(struct pvr2_buffer *bp)
{
@@ -533,10 +535,12 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp,
}
/* Query / set the nominal buffer count */
+#if 0
int pvr2_stream_get_buffer_count(struct pvr2_stream *sp)
{
return sp->buffer_target_count;
}
+#endif /* 0 */
int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
{
@@ -575,6 +579,8 @@ int pvr2_stream_get_ready_count(struct pvr2_stream *sp)
return sp->r_count;
}
+#if 0
+
int pvr2_stream_get_idle_count(struct pvr2_stream *sp)
{
return sp->i_count;
@@ -587,6 +593,8 @@ void pvr2_stream_flush(struct pvr2_stream *sp)
} while(0); mutex_unlock(&sp->mutex);
}
+#endif /* 0 */
+
void pvr2_stream_kill(struct pvr2_stream *sp)
{
struct pvr2_buffer *bp;
@@ -640,6 +648,7 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp)
return ret;
}
+#if 0
int pvr2_buffer_idle(struct pvr2_buffer *bp)
{
struct pvr2_stream *sp;
@@ -654,6 +663,7 @@ int pvr2_buffer_idle(struct pvr2_buffer *bp)
} while(0); mutex_unlock(&sp->mutex);
return 0;
}
+#endif /* 0 */
int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt)
{
@@ -693,10 +703,12 @@ int pvr2_buffer_get_status(struct pvr2_buffer *bp)
return bp->status;
}
+#if 0
enum pvr2_buffer_state pvr2_buffer_get_state(struct pvr2_buffer *bp)
{
return bp->state;
}
+#endif /* 0 */
int pvr2_buffer_get_id(struct pvr2_buffer *bp)
{