summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock.c
diff options
context:
space:
mode:
authorPaul Mundt2009-05-14 10:38:46 +0200
committerPaul Mundt2009-05-14 10:38:46 +0200
commit549b5e358d17a8c04953ed80896ce07d37722451 (patch)
treec9cf2badccaf4868f3ba014b67a73983e7f7d1a9 /arch/sh/kernel/cpu/clock.c
parentsh: clkfwk: Map tree hierarchy in debugfs. (diff)
downloadkernel-qcow2-linux-549b5e358d17a8c04953ed80896ce07d37722451.tar.gz
kernel-qcow2-linux-549b5e358d17a8c04953ed80896ce07d37722451.tar.xz
kernel-qcow2-linux-549b5e358d17a8c04953ed80896ce07d37722451.zip
sh: clkfwk: Add MSTP bits to SH7785 clock framework.
This plugs in all of the MSTP functions in to the clock framework, and hands them off to the platform devices that want them. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index 686477f8ae5b..012d23476a72 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -39,7 +39,7 @@ static DEFINE_MUTEX(clock_list_sem);
/* Used for clocks that always have same value as the parent clock */
unsigned long followparent_recalc(struct clk *clk)
{
- return clk->parent->rate;
+ return clk->parent ? clk->parent->rate : 0;
}
int clk_reparent(struct clk *child, struct clk *parent)
@@ -512,7 +512,7 @@ static int clk_debugfs_register_one(struct clk *c)
char *p = s;
p += sprintf(p, "%s", c->name);
- if (c->id > 0)
+ if (c->id >= 0)
sprintf(p, ":%d", c->id);
d = debugfs_create_dir(s, pa ? pa->dentry : clk_debugfs_root);
if (!d)