From: Grant Likely <grant.likely@secretlab.ca>
To: devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] of/device: Make of_device_make_bus_id() usable by other code.
Date: Sat, 24 Jul 2010 10:01:11 -0600 [thread overview]
Message-ID: <20100724160111.7072.68144.stgit@angua> (raw)
The AMBA bus should also use of_device_make_bus_id() when populating device
out of device tree data. This patch makes the function non-static, and
adds a suitable prototype in of_device.h
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/of/platform.c | 2 +-
include/linux/of_device.h | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 94fa719..600d77f 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -508,7 +508,7 @@ EXPORT_SYMBOL(of_unregister_driver);
* value to derive a unique name. As a last resort it will use the node
* name followed by a unique number.
*/
-static void of_device_make_bus_id(struct device *dev)
+void of_device_make_bus_id(struct device *dev)
{
static atomic_t bus_no_reg_magic;
struct device_node *node = dev->of_node;
diff --git a/include/linux/of_device.h b/include/linux/of_device.h
index e11a0be..249bc11 100644
--- a/include/linux/of_device.h
+++ b/include/linux/of_device.h
@@ -27,6 +27,9 @@
extern const struct of_device_id *of_match_device(
const struct of_device_id *matches, const struct device *dev);
+#if !defined(CONFIG_SPARC)
+extern void of_device_make_bus_id(struct device *dev);
+#endif
/**
* of_driver_match_device - Tell if a driver's of_match_table matches a device.
next reply other threads:[~2010-07-24 16:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 16:01 Grant Likely [this message]
2010-07-25 3:34 ` [PATCH] of/device: Make of_device_make_bus_id() usable by other code Stephen Rothwell
2010-07-25 21:23 ` Grant Likely
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=20100724160111.7072.68144.stgit@angua \
--to=grant.likely@secretlab.ca \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-kernel@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