msm: vidc: Update the clock state variable before unprepare clocks

Clock state variable is used to check if clock is enabled or not.
While preparing the clocks the state is updated once all the clocks
are prepared and enabled. While disabling the state is updated once
all the clocks are disabled. So there is a delay between first clock
unprepare and the variable update. At this point if someone reads the
clock state it shows the clock is enabled where as the clock is
actually disabled. Hence update the variable before unpreparing the
first clock. This also matches with prepare enable update.

Change-Id: I3f4bcee696a168f39b55241cae2dc00cdb18d36b
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Signed-off-by: Balamurugan Alagarsamy <balaga@codeaurora.org>
1 file changed