aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-ioread.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-07-18 22:42:18 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-07-29 17:22:24 -0300
commite61b6fc58b4a0b07f1ccfc67bf2b84a2848fcb2c (patch)
treee090be244c9a917ce8b698d426708d0dac1db049 /drivers/media/video/pvrusb2/pvrusb2-ioread.c
parent32e4c3a5622e832938aa0272e21a292564ff090a (diff)
V4L/DVB (4337): Refine dead code elimination in pvrusb2
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-ioread.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ioread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index f7a2e225a00..b71f9a961f8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -213,7 +213,9 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
" pvr2_ioread_setup (tear-down) id=%p",cp);
pvr2_ioread_stop(cp);
pvr2_stream_kill(cp->stream);
- pvr2_stream_set_buffer_count(cp->stream,0);
+ if (pvr2_stream_get_buffer_count(cp->stream)) {
+ pvr2_stream_set_buffer_count(cp->stream,0);
+ }
cp->stream = NULL;
}
if (sp) {
@@ -251,7 +253,6 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl)
return ret;
}
-
static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
{
int stat;