Skip to content

Commit

Permalink
V4L/DVB (11188): pvrusb2: Sub-device update must happen BEFORE state …
Browse files Browse the repository at this point in the history
…dirty bits are cleared

The sub-device update mechanism relies on various "dirty" bits in the
driver in order to know what pieces of state need to be propagated out
to the various sub-devices.  But that won't work if the dirty bits are
cleared before the update gets a chance to run.  This change ensures
that the update takes place before the dirty bits are cleared.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mike Isely authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 0db8556 commit e68a619
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/media/video/pvrusb2/pvrusb2-hdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3238,15 +3238,15 @@ static int pvr2_hdw_commit_execute(struct pvr2_hdw *hdw)
}
}

/* Check and update state for all sub-devices. */
pvr2_subdev_update(hdw);

for (idx = 0; idx < hdw->control_cnt; idx++) {
cptr = hdw->controls + idx;
if (!cptr->info->clear_dirty) continue;
cptr->info->clear_dirty(cptr);
}

/* Check and update state for all sub-devices. */
pvr2_subdev_update(hdw);

/* Now execute i2c core update */
pvr2_i2c_core_sync(hdw);

Expand Down

0 comments on commit e68a619

Please sign in to comment.