From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 05/13] sh: Allow registering clocks without name
Date: Mon, 10 May 2010 11:23:56 +0000 [thread overview]
Message-ID: <20100510112356.14587.65518.sendpatchset@t400s> (raw)
From: Magnus Damm <damm@opensource.se>
Stop-gap update for the SH specific clock code to allow
registering clocks with name set to NULL. This code will
get removed later in the patchset.
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;
reply other threads:[~2010-05-10 11:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100510112356.14587.65518.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox