summaryrefslogtreecommitdiff
path: root/drivers/media/video/pvrusb2/pvrusb2-encoder.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2007-10-15 01:18:12 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-22 18:01:51 +0400
commit9a607f01b044dd83aa6daf6edad1e98cfc8c33ba (patch)
treeca3e95fbf3753785800b514692d1a58870943039 /drivers/media/video/pvrusb2/pvrusb2-encoder.c
parenta39a8ed7beaafe02ce154dfd227f7d734a9f34dc (diff)
downloadlinux-9a607f01b044dd83aa6daf6edad1e98cfc8c33ba.tar.xz
V4L/DVB (6357): pvrusb2: Improve encoder chip health tracking
This is a minor change to help with tracking the viability of the encoder chip within the PVR USB2 device. 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-encoder.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-encoder.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 20b614436d2c..205087a3e136 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -209,6 +209,11 @@ static int pvr2_encoder_cmd(void *ctxt,
LOCK_TAKE(hdw->ctl_lock); do {
+ if (!hdw->flag_encoder_ok) {
+ ret = -EIO;
+ break;
+ }
+
retry_flag = 0;
try_count++;
ret = 0;
@@ -273,6 +278,7 @@ static int pvr2_encoder_cmd(void *ctxt,
ret = -EBUSY;
}
if (ret) {
+ hdw->flag_encoder_ok = 0;
pvr2_trace(
PVR2_TRACE_ERROR_LEGS,
"Giving up on command."