diff options
author | Magnus Damm <damm@opensource.se> | 2010-05-10 14:01:34 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-05-11 02:48:43 (GMT) |
commit | d97432f1014c73bbace9eb1e67742c1bcab0c3cd (patch) | |
tree | 99383d7d9ccfa38367238c75b131ea9468a17a68 /arch/sh/kernel | |
parent | fd30401b07fdcf21e4be87fd276d1b2c84d712a3 (diff) | |
download | linux-fsl-qoriq-d97432f1014c73bbace9eb1e67742c1bcab0c3cd.tar.xz |
sh: allow registering clocks without name
Modify the SuperH clock code to support struct clk
with NULL as name. Such clocks will not be hooked
up to debugfs.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/cpu/clock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 9ded1bc..073f4ff 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c @@ -415,7 +415,7 @@ struct clk *clk_get(struct device *dev, const char *id) mutex_lock(&clock_list_sem); list_for_each_entry(p, &clock_list, node) { - if (p->id == idno && + if (p->name && p->id == idno && strcmp(id, p->name) == 0 && try_module_get(p->owner)) { clk = p; goto found; @@ -423,7 +423,8 @@ struct clk *clk_get(struct device *dev, const char *id) } list_for_each_entry(p, &clock_list, node) { - if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { + if (p->name && + strcmp(id, p->name) == 0 && try_module_get(p->owner)) { clk = p; break; } @@ -594,7 +595,7 @@ static int clk_debugfs_register(struct clk *c) return err; } - if (!c->dentry) { + if (!c->dentry && c->name) { err = clk_debugfs_register_one(c); if (err) return err; |