Commit 6413b090 authored by Valentine Barshak's avatar Valentine Barshak Committed by Mike Turquette

clk: shmobile: Fix MSTP clock index

Use clkidx when registering MSTP clocks instead of loop counter
since the value is then used to access the specific clock index bit
in the mstp register.

The issue was introduced by the following commit:
f94859c2 "clk: shmobile: Add MSTP clock support"

Changes in V2:
* none
Signed-off-by: default avatarValentine Barshak <valentine.barshak@cogentembedded.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
parent 6b71e0d9
...@@ -205,8 +205,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np) ...@@ -205,8 +205,8 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
continue; continue;
} }
clks[clkidx] = cpg_mstp_clock_register(name, parent_name, i, clks[clkidx] = cpg_mstp_clock_register(name, parent_name,
group); clkidx, group);
if (!IS_ERR(clks[clkidx])) { if (!IS_ERR(clks[clkidx])) {
group->data.clk_num = max(group->data.clk_num, clkidx); group->data.clk_num = max(group->data.clk_num, clkidx);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment