linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CLKDEV: return from clk_find as soon as we get maching clk
@ 2010-03-02 11:05 Viresh KUMAR
  2010-03-02 20:39 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Viresh KUMAR @ 2010-03-02 11:05 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-03 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02 11:05 [PATCH] CLKDEV: return from clk_find as soon as we get maching clk Viresh KUMAR
2010-03-02 20:39 ` Russell King - ARM Linux
2010-03-02 21:01   ` Uwe Kleine-König
2010-03-03 19:44     ` Russell King - ARM Linux

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).