diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-01-31 05:05:51 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-08 12:50:42 -0500 |
commit | 3f0a820c4c0b4670fb5f164baa5582e23c2ef118 (patch) | |
tree | 6af02e1456c0316791ab95e7da9c09496f29c232 /arch/arm/mach-omap2/clock.c | |
parent | b5088c0d90b898802318c62caf2320a53df6ce57 (diff) |
[ARM] omap: create a proper tree of clocks
Traditionally, we've tracked the parent/child relationships between
clk structures by setting the child's parent member to point at the
upstream clock. As a result, when decending the tree, we have had
to scan all clocks to find the children.
Avoid this wasteful scanning by keeping a list of the clock's children.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 478ca660fffd..38a7898d0ce3 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -175,7 +175,7 @@ void omap2_init_clksel_parent(struct clk *clk) | |||
175 | clk->name, clks->parent->name, | 175 | clk->name, clks->parent->name, |
176 | ((clk->parent) ? | 176 | ((clk->parent) ? |
177 | clk->parent->name : "NULL")); | 177 | clk->parent->name : "NULL")); |
178 | clk->parent = clks->parent; | 178 | clk_reparent(clk, clks->parent); |
179 | }; | 179 | }; |
180 | found = 1; | 180 | found = 1; |
181 | } | 181 | } |
@@ -780,7 +780,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
780 | if (clk->usecount > 0) | 780 | if (clk->usecount > 0) |
781 | _omap2_clk_enable(clk); | 781 | _omap2_clk_enable(clk); |
782 | 782 | ||
783 | clk->parent = new_parent; | 783 | clk_reparent(clk, new_parent); |
784 | 784 | ||
785 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ | 785 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ |
786 | clk->rate = new_parent->rate; | 786 | clk->rate = new_parent->rate; |