From: Josh Cartwright <joshc@codeaurora.org>
To: Mark Salter <msalter@redhat.com>,
Aurelien Jacquiot <a-jacquiot@ti.com>,
linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org, linux-c6x-dev@linux-c6x.org
Subject: [PATCH 7/8] C6X: make use of of_find_matching_node_and_match
Date: Tue, 11 Feb 2014 10:24:05 -0600 [thread overview]
Message-ID: <1392135847-30791-8-git-send-email-joshc@codeaurora.org> (raw)
In-Reply-To: <1392135847-30791-1-git-send-email-joshc@codeaurora.org>
Instead of the of_find_matching_node()/of_match_node() pair, which requires two
iterations through the match table, make use of of_find_matching_node_and_match(),
which only iterates through the table once.
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
---
arch/c6x/platforms/plldata.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/c6x/platforms/plldata.c b/arch/c6x/platforms/plldata.c
index 755359e..8fddc46 100644
--- a/arch/c6x/platforms/plldata.c
+++ b/arch/c6x/platforms/plldata.c
@@ -397,7 +397,7 @@ static void __init c6678_setup_clocks(struct device_node *node)
}
#endif /* CONFIG_SOC_TMS320C6678 */
-static struct of_device_id c6x_clkc_match[] __initdata = {
+static const struct of_device_id c6x_clkc_match[] __initdata = {
#ifdef CONFIG_SOC_TMS320C6455
{ .compatible = "ti,c6455-pll", .data = c6455_setup_clocks },
#endif
@@ -426,7 +426,7 @@ void __init c64x_setup_clocks(void)
int err;
u32 val;
- node = of_find_matching_node(NULL, c6x_clkc_match);
+ node = of_find_matching_node_and_match(NULL, c6x_clkc_match, &id);
if (!node)
return;
@@ -458,8 +458,7 @@ void __init c64x_setup_clocks(void)
pll->lock_delay = val;
/* id->data is a pointer to SoC-specific setup */
- id = of_match_node(c6x_clkc_match, node);
- if (id && id->data) {
+ if (id->data) {
__setup_clocks = id->data;
__setup_clocks(node);
}
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-02-11 16:24 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-11 16:23 [PATCH 0/8] of_find_matching_node/of_match_node -> of_find_matching_node_and_match Josh Cartwright
[not found] ` <1392135847-30791-1-git-send-email-joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-02-11 16:23 ` [PATCH 1/8] bus: arm-cci: make use of of_find_matching_node_and_match Josh Cartwright
2014-02-11 16:24 ` [PATCH 2/8] bus: mvebu-mbus: " Josh Cartwright
[not found] ` <1392135847-30791-3-git-send-email-joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-02-11 16:39 ` Jason Cooper
2014-02-11 19:22 ` Jason Cooper
2014-02-11 16:24 ` [PATCH 3/8] ARM: at91: " Josh Cartwright
2014-02-11 17:46 ` Nicolas Ferre
[not found] ` <52FA61F4.90905-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
2014-02-11 18:44 ` Josh Cartwright
2014-02-11 16:24 ` [PATCH 4/8] ARM: mvebu: " Josh Cartwright
[not found] ` <1392135847-30791-5-git-send-email-joshc-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-02-11 16:41 ` Thomas Petazzoni
2014-02-11 16:53 ` Jason Cooper
[not found] ` <20140211165314.GA8533-u4khhh1J0LxI1Ri9qeTfzeTW4wlIGRCZ@public.gmane.org>
2014-02-11 17:10 ` Thomas Petazzoni
2014-02-11 17:31 ` Gregory CLEMENT
[not found] ` <52FA5E75.7030402-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-02-11 17:34 ` Jason Cooper
2014-02-11 17:43 ` Josh Cartwright
2014-02-11 19:29 ` Jason Cooper
2014-02-11 16:24 ` [PATCH 5/8] ARM: prima2: " Josh Cartwright
2014-02-11 16:24 ` [PATCH 6/8] ARM: l2x0: " Josh Cartwright
2014-02-11 16:24 ` Josh Cartwright [this message]
2014-02-11 16:24 ` [PATCH 8/8] cpufreq: ppc: " Josh Cartwright
2014-02-12 5:01 ` Viresh Kumar
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=1392135847-30791-8-git-send-email-joshc@codeaurora.org \
--to=joshc@codeaurora.org \
--cc=a-jacquiot@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-kernel@vger.kernel.org \
--cc=msalter@redhat.com \
/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).