Skip to content
Commit c49f0437 authored by Leandro Belli's avatar Leandro Belli 👾
Browse files

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's avatarLeandro Belli <leandro.belli@arm.com>
Change-Id: I9819891fe2237abb252764dadd4a1d36302bc4bf
parent f71f3423
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment