From: Balaji T K <balajitk@ti.com>
To: robherring2@gmail.com, devicetree-discuss@lists.ozlabs.org
Cc: linux-omap@vger.kernel.org, rnayak@ti.com, cjb@laptop.org,
bigeasy@linutronix.de, Balaji T K <balajitk@ti.com>
Subject: [RFC] dt: export of_have_populated_dt
Date: Tue, 10 Apr 2012 20:41:12 +0530 [thread overview]
Message-ID: <1334070672-11252-1-git-send-email-balajitk@ti.com> (raw)
If of_have_populated_dt is called from module, build fails with "allnodes"
undefined error, so remove inline and export of_have_populated_dt.
Signed-off-by: Balaji T K <balajitk@ti.com>
---
drivers/of/base.c | 6 ++++++
include/linux/of.h | 6 +-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 5806449..dc1af42 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -186,6 +186,12 @@ struct property *of_find_property(const struct device_node *np,
}
EXPORT_SYMBOL(of_find_property);
+bool of_have_populated_dt(void)
+{
+ return allnodes != NULL;
+}
+EXPORT_SYMBOL(of_have_populated_dt);
+
/**
* of_find_all_nodes - Get next node in global list
* @prev: Previous node or NULL to start iteration
diff --git a/include/linux/of.h b/include/linux/of.h
index fa7fb1d..28e933e 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -92,11 +92,6 @@ extern struct device_node *of_chosen;
extern struct device_node *of_aliases;
extern rwlock_t devtree_lock;
-static inline bool of_have_populated_dt(void)
-{
- return allnodes != NULL;
-}
-
static inline bool of_node_is_root(const struct device_node *node)
{
return node && (node->parent == NULL);
@@ -112,6 +107,7 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
set_bit(flag, &n->_flags);
}
+extern bool of_have_populated_dt(void);
extern struct device_node *of_find_all_nodes(struct device_node *prev);
/*
--
1.7.0.4
next reply other threads:[~2012-04-10 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 15:11 Balaji T K [this message]
2012-04-10 16:19 ` [RFC] dt: export of_have_populated_dt Cousson, Benoit
[not found] ` <4F845D99.7020705-l0cyMroinI0@public.gmane.org>
2012-04-10 16:21 ` Chris Ball
2012-04-10 16:29 ` Cousson, Benoit
2012-04-10 17:20 ` Rob Herring
2012-04-10 20:33 ` Grant Likely
2012-04-11 4:16 ` Rajendra Nayak
[not found] ` <1334070672-11252-1-git-send-email-balajitk-l0cyMroinI0@public.gmane.org>
2012-04-10 17:36 ` Sebastian Andrzej Siewior
2012-04-11 4:18 ` Rajendra Nayak
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=1334070672-11252-1-git-send-email-balajitk@ti.com \
--to=balajitk@ti.com \
--cc=bigeasy@linutronix.de \
--cc=cjb@laptop.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-omap@vger.kernel.org \
--cc=rnayak@ti.com \
--cc=robherring2@gmail.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).