From: viresh.kumar@st.com (Viresh KUMAR)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] CLKDEV: return from clk_find as soon as we get maching clk
Date: Tue, 2 Mar 2010 16:35:54 +0530 [thread overview]
Message-ID: <1267527954-20270-1-git-send-email-viresh.kumar@st.com> (raw)
clk_find function looks for clock with matching dev_id and con_id.
We should return from clk_find as soon as we get a clock with matching dev_id
and con_id. This can be done by comparing variable "match" with 3.
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
---
arch/arm/common/clkdev.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index aae5bc0..736dfba 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -55,6 +55,9 @@ static struct clk *clk_find(const char *dev_id, const char *con_id)
if (match == 0)
continue;
+ if (match == 3)
+ return p->clk;
+
if (match > best) {
clk = p->clk;
best = match;
--
1.6.0.2
next reply other threads:[~2010-03-02 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-02 11:05 Viresh KUMAR [this message]
2010-03-02 20:39 ` [PATCH] CLKDEV: return from clk_find as soon as we get maching clk Russell King - ARM Linux
2010-03-02 21:01 ` Uwe Kleine-König
2010-03-03 19:44 ` Russell King - ARM Linux
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=1267527954-20270-1-git-send-email-viresh.kumar@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).