Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 838cdd04 authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

mmc: core/card: maintain clock gating reference count integrity



Clock gating logic maintains the reference count which gets incremented
with *hold* API call and get decremented with *release* API call.
If we want to make sure that clocks are enabled during some operation,
we should call *hold* API before the operation and then call *release*
API after the operation is finished. So *hold* and *release* should be
in pair and called exactly once per operation, any violation of these
rules may put the reference count out of sync and can cause issues
(like unclocked register access). This change fixes the places where
this can go out of sync.

Change-Id: I2d784cc31027a551a466beec63ee8cd0a1f67af7
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 41747adc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment