From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Colin Cross <ccross@android.com>,
John Bonesio <bones@secretlab.ca>,
"Jean Delvare (PC drivers, core)" <khali@linux-fr.org>,
"Ben Dooks (embedded platforms)" <ben-linux@fluff.org>,
Grant Likely <grant.likely@secretlab.ca>,
linux-i2c@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
"Sam Ravnborg sam"@ravnborg.org
Subject: [RFC][PATCH] of: add a dummy implementation of of_get_property() in of.h
Date: Fri, 05 Aug 2011 16:56:14 +0800 [thread overview]
Message-ID: <1312534574.18064.2.camel@phoenix> (raw)
Then we can avoid having #ifdef CONFIG_OF splattered around the place
calling of_get_property(), it leads to errors.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
This patch fixes below build error with "make tegra_defconfig;make".
CC drivers/i2c/busses/i2c-tegra.o
drivers/i2c/busses/i2c-tegra.c: In function 'tegra_i2c_probe':
drivers/i2c/busses/i2c-tegra.c:615: error: implicit declaration of function 'of_get_property'
drivers/i2c/busses/i2c-tegra.c:616: warning: assignment makes pointer from integer without a cast
make[3]: *** [drivers/i2c/busses/i2c-tegra.o] Error 1
make[2]: *** [drivers/i2c/busses] Error 2
make[1]: *** [drivers/i2c] Error 2
make: *** [drivers] Error 2
Regards,
Axel
include/linux/of.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 0085bb0..320cbad 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -256,6 +256,12 @@ static inline int of_property_read_string(struct device_node *np,
return -ENOSYS;
}
+static inline const void *of_get_property(const struct device_node *np,
+ const char *name, int *lenp)
+{
+ return NULL;
+}
+
#endif /* CONFIG_OF */
static inline int of_property_read_u32(const struct device_node *np,
--
1.7.4.1
next reply other threads:[~2011-08-05 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 8:56 Axel Lin [this message]
2011-08-05 9:05 ` Tobias Klauser
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=1312534574.18064.2.camel@phoenix \
--to=axel.lin@gmail.com \
--cc="Sam Ravnborg sam"@ravnborg.org \
--cc=ben-linux@fluff.org \
--cc=bones@secretlab.ca \
--cc=ccross@android.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.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
all inboxes | Powered by JetHome®