]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4241): Fix faulty encoder error recovery in pvrusb2
authorMike Isely <isely@pobox.com>
Sun, 25 Jun 2006 23:04:47 +0000 (20:04 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 27 Jun 2006 03:17:29 +0000 (00:17 -0300)
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pvrusb2/pvrusb2-hdw.c

index f461830c64c957cbb58e297d8be8ec483ca35bb3..1829029cc9b9d9f9803dd3fe372bb22ba0ccf48c 100644 (file)
@@ -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;"