aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/clock.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-14 17:38:46 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-05-14 17:38:46 +0900
commit549b5e358d17a8c04953ed80896ce07d37722451 (patch)
treec9cf2badccaf4868f3ba014b67a73983e7f7d1a9 /arch/sh/kernel/cpu/clock.c
parentcedcf3366f2191885aff92d33d6078ef08203e52 (diff)
downloadkernel_samsung_smdk4412-549b5e358d17a8c04953ed80896ce07d37722451.tar.gz
kernel_samsung_smdk4412-549b5e358d17a8c04953ed80896ce07d37722451.tar.bz2
kernel_samsung_smdk4412-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 686477f8ae5..012d23476a7 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)