summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-13 17:03:09 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-05-13 17:03:09 +0900
commitd672fef02738582bdeae6e77176e141eeb9169bc (patch)
tree645861bd0eb459b2ab191653fb90ff12bda74883 /arch/sh/kernel/cpu/clock.c
parentaf777ce42d3d51cdef353ce296d6f99dc503feef (diff)
downloadkernel-crypto-d672fef02738582bdeae6e77176e141eeb9169bc.tar.gz
kernel-crypto-d672fef02738582bdeae6e77176e141eeb9169bc.tar.xz
kernel-crypto-d672fef02738582bdeae6e77176e141eeb9169bc.zip
sh: clkfwk: Handle NULL clkops for root clocks.
root clocks may simply be placeholders for rate and ancestry information, and have no real associated operations of their own. Account for this, so we are still able to use these sorts of clocks for rate propagation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/clock.c')
-rw-r--r--arch/sh/kernel/cpu/clock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 0eedf939264..2ced20f870d 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -103,7 +103,7 @@ void propagate_rate(struct clk *tclk)
struct clk *clkp;
list_for_each_entry(clkp, &tclk->children, sibling) {
- if (clkp->ops->recalc)
+ if (clkp->ops && clkp->ops->recalc)
clkp->rate = clkp->ops->recalc(clkp);
propagate_rate(clkp);
}
@@ -196,7 +196,7 @@ void recalculate_root_clocks(void)
struct clk *clkp;
list_for_each_entry(clkp, &root_clks, sibling) {
- if (clkp->ops->recalc)
+ if (clkp->ops && clkp->ops->recalc)
clkp->rate = clkp->ops->recalc(clkp);
propagate_rate(clkp);
}
@@ -224,7 +224,7 @@ int clk_register(struct clk *clk)
list_add(&clk->sibling, &root_clks);
list_add(&clk->node, &clock_list);
- if (clk->ops->init)
+ if (clk->ops && clk->ops->init)
clk->ops->init(clk);
mutex_unlock(&clock_list_sem);