Thread (47 messages) 47 messages, 2 authors, 2013-09-10

[PATCHv6 33/45] ARM: OMAP2+: hwmod: fix opt_clk handling with DT

From: Tero Kristo <hidden>
Date: 2013-08-29 13:16:25
Also in: linux-devicetree, linux-omap
Subsystem: arm port, omap hwmod support, omap2+ support, the rest · Maintainers: Russell King, Paul Walmsley, Aaro Koskinen, Andreas Kemnade, Kevin Hilman, Roger Quadros, Tony Lindgren, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help