clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes
authorRob Herring <robh@kernel.org>
Fri, 9 Jun 2023 18:13:47 +0000 (12:13 -0600)
committerStephen Boyd <sboyd@kernel.org>
Tue, 20 Jun 2023 18:56:28 +0000 (11:56 -0700)
commitbd73d1fd63d4f67dc78640c9ae4f83e20a021d76
treecc265ef13848662e35494f177b0c54024f5ad076
parent1949c0ebc8d660d35ea968ed609c528076b7d44f
clk: mvebu: Iterate over possible CPUs instead of DT CPU nodes

Rework iterating over DT CPU nodes to iterate over possible CPUs
instead. There's no need to walk the DT CPU nodes again. Possible CPUs
is equal to the number of CPUs defined in the DT. Using the "reg" value
for an array index is fragile as it assumes "reg" is 0-N which often is
not the case.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230327-mvebu-clk-fixes-v2-3-8333729ee45d@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mvebu/clk-cpu.c