aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 f461830c64c9..1829029cc9b9 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,
1098 if (!hdw->flag_ok) return; 1098 if (!hdw->flag_ok) return;
1099 1099
1100 msk &= PVR2_SUBSYS_ALL; 1100 msk &= PVR2_SUBSYS_ALL;
1101 nmsk = (hdw->subsys_enabled_mask & ~msk) | (val & msk);
1102 nmsk &= PVR2_SUBSYS_ALL;
1101 1103
1102 for (;;) { 1104 for (;;) {
1103 tryCount++; 1105 tryCount++;
1104 vmsk = hdw->subsys_enabled_mask & PVR2_SUBSYS_ALL; 1106 if (!((nmsk ^ hdw->subsys_enabled_mask) &
1105 nmsk = (vmsk & ~msk) | (val & msk); 1107 PVR2_SUBSYS_ALL)) break;
1106 if (!(nmsk ^ vmsk)) break;
1107 if (tryCount > 4) { 1108 if (tryCount > 4) {
1108 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 1109 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
1109 "Too many retries when configuring device;" 1110 "Too many retries when configuring device;"