* [PATCH 04/07] sh: allow registering clocks without name
@ 2010-05-10 14:01 Magnus Damm
0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2010-05-10 14:01 UTC (permalink / raw)
To: linux-sh
From: Magnus Damm <damm@opensource.se>
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>
---
arch/sh/kernel/cpu/clock.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- 0001/arch/sh/kernel/cpu/clock.c
+++ work/arch/sh/kernel/cpu/clock.c 2010-05-10 19:04:14.000000000 +0900
@@ -415,7 +415,7 @@ struct clk *clk_get(struct device *dev,
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,
}
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 c
return err;
}
- if (!c->dentry) {
+ if (!c->dentry && c->name) {
err = clk_debugfs_register_one(c);
if (err)
return err;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-10 14:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 14:01 [PATCH 04/07] sh: allow registering clocks without name Magnus Damm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.