summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-06-25 23:04:47 (GMT)
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-27 03:17:29 (GMT)
commiteb8e0ee4f51a89d569c01d5b09a8cbc935c72a4c (patch)
tree9436985b03e477a471eb731bafe51866ee3508cc /drivers/media
parenta761f4311b3e31008c7d168c3a8c254a9c7e35ac (diff)
downloadlinux-fsl-qoriq-eb8e0ee4f51a89d569c01d5b09a8cbc935c72a4c.tar.xz
V4L/DVB (4241): Fix faulty encoder error recovery in pvrusb2
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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index f461830..1829029 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -1098,12 +1098,13 @@ void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
if (!hdw->flag_ok) return;
msk &= PVR2_SUBSYS_ALL;
+ nmsk = (hdw->subsys_enabled_mask & ~msk) | (val & msk);
+ nmsk &= PVR2_SUBSYS_ALL;
for (;;) {
tryCount++;
- vmsk = hdw->subsys_enabled_mask & PVR2_SUBSYS_ALL;
- nmsk = (vmsk & ~msk) | (val & msk);
- if (!(nmsk ^ vmsk)) break;
+ if (!((nmsk ^ hdw->subsys_enabled_mask) &
+ PVR2_SUBSYS_ALL)) break;
if (tryCount > 4) {
pvr2_trace(PVR2_TRACE_ERROR_LEGS,
"Too many retries when configuring device;"