scmi_clock: Fix policy reference counter mismatch
The reference count for each clock is stored into an internal array,
clock_count[], whose size is "number of available clocks" (not SCMI).
In that table, we are mistakenly using an index that is taken from the
agent's number of clocks. That leads to a mismatch of clock reference
count in some cases.
Fix this by using the clock index that corresponds to the agent's
device index to determine to correct location in clock_count[] table to
update the reference count.
At the same time, clean-up some of the variables' name to ease the
readability of the various clocks.
Signed-off-by:
Leandro Belli <leandro.belli@arm.com>
Change-Id: I9819891fe2237abb252764dadd4a1d36302bc4bf
Loading
Please register or sign in to comment