Rajendra's patch had a bug which caused opt clocks to fail initialize
completely, causing boot warnings with devices that depend on them.

Signed-off-by: Tero Kristo <[email protected]>
---
 arch/arm/mach-omap2/omap_hwmod.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 116219e..f24246c 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -827,8 +827,7 @@ static const char **_parse_opt_clks_dt(struct omap_hwmod 
*oh,
                of_property_read_string_index(np, "clock-names", i, &clk_name);
                if (!strcmp(clk_name, "fck"))
                        continue;
-               opt_clks_cnt++;
-               opt_clk_names[i] = clk_name;
+               opt_clk_names[(*opt_clks_cnt)++] = clk_name;
        }
        return opt_clk_names;
 }
@@ -851,7 +850,7 @@ static int _init_opt_clks_dt(struct omap_hwmod *oh, struct 
device_node *np)
 
        oh->opt_clks_cnt = opt_clks_cnt;
 
-       for (i = 0; i < oh->opt_clks_cnt; i++) {
+       for (i = 0; i < opt_clks_cnt; i++) {
                c = of_clk_get_by_name(np, opt_clk_names[i]);
                if (IS_ERR(c)) {
                        pr_warn("omap_hwmod: %s: cannot clk_get opt_clk %s\n",
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to