From: Rob Herring <robherring2@gmail.com>
To: arm@kernel.org
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Warren <swarren@wwwdotorg.org>,
Rob Herring <rob.herring@calxeda.com>,
John Stultz <johnstul@us.ibm.com>
Subject: [PATCH 1/4] clocksource: pass DT node pointer to init functions
Date: Thu, 7 Feb 2013 13:09:01 -0600 [thread overview]
Message-ID: <1360264144-20714-2-git-send-email-robherring2@gmail.com> (raw)
In-Reply-To: <1360264144-20714-1-git-send-email-robherring2@gmail.com>
From: Rob Herring <rob.herring@calxeda.com>
In cases where we have multiple nodes of the same type, we may need the
node pointer to know which node was matched. Passing the node pointer
also keeps the init function from having to match the node a 2nd time.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
drivers/clocksource/clksrc-of.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c
index bdabdaa..3ef11fb 100644
--- a/drivers/clocksource/clksrc-of.c
+++ b/drivers/clocksource/clksrc-of.c
@@ -26,10 +26,10 @@ void __init clocksource_of_init(void)
{
struct device_node *np;
const struct of_device_id *match;
- void (*init_func)(void);
+ void (*init_func)(struct device_node *);
for_each_matching_node_and_match(np, __clksrc_of_table, &match) {
init_func = match->data;
- init_func();
+ init_func(np);
}
}
--
1.7.10.4
next prev parent reply other threads:[~2013-02-07 19:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-07 19:09 [PATCH 0/4] Improve CLKSRC_OF matching Rob Herring
2013-02-07 19:09 ` Rob Herring [this message]
2013-02-13 16:21 ` [PATCH 1/4] clocksource: pass DT node pointer to init functions Michal Simek
2013-02-13 16:33 ` Rob Herring
2013-02-13 17:33 ` Michal Simek
2013-02-14 1:30 ` Rob Herring
2013-02-14 6:45 ` Michal Simek
2013-02-14 14:22 ` Rob Herring
2013-02-07 19:09 ` [PATCH 2/4] clocksource: bcm2835: use the device_node pointer passed to init Rob Herring
2013-02-09 3:47 ` Stephen Warren
2013-02-07 19:09 ` [PATCH 3/4] clocksource: vt8500: " Rob Herring
2013-02-07 19:09 ` [PATCH 4/4] clocksource: tegra20: " Rob Herring
2013-02-07 19:39 ` Stephen Warren
2013-02-07 20:05 ` Hiroshi Doyu
2013-02-07 22:44 ` [PATCH 0/4] Improve CLKSRC_OF matching Arnd Bergmann
2013-02-07 23:36 ` Rob Herring
2013-02-07 23:45 ` Arnd Bergmann
2013-02-08 4:51 ` Tony Prisk
2013-02-08 13:07 ` Rob Herring
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=1360264144-20714-2-git-send-email-robherring2@gmail.com \
--to=robherring2@gmail.com \
--cc=arm@kernel.org \
--cc=johnstul@us.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=swarren@wwwdotorg.org \
--cc=tglx@linutronix.de \
/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).