aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-07 13:40:54 -0400
committerRob Herring <rob.herring@calxeda.com>2012-10-17 16:53:00 -0400
commit25c040c99b1e3f6d97ca3d993878549aac5fd2c8 (patch)
tree8a6cfffc748517cc61e281d47d105e8930e77c6e /include/linux
parentddffeb8c4d0331609ef2581d84de4d763607bd37 (diff)
of: add stub of_get_child_by_name for non-OF builds
Fixes build error on s3c6400_defconfig, introduced by commit 06455bbcab76e5f5225de5f38ab948d37a1c3587, "dt/s3c64xx/spi: Use of_get_child_by_name to get a named child". drivers/spi/spi-s3c64xx.c: In function 's3c64xx_get_slave_ctrldata': drivers/spi/spi-s3c64xx.c:838:2: error: implicit declaration of function 'of_get_child_by_name' [-Werror=implicit-function-declaration] Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/of.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 72843b72a2b2..b4e50d56fc74 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -331,6 +331,13 @@ static inline bool of_have_populated_dt(void)
331#define for_each_child_of_node(parent, child) \ 331#define for_each_child_of_node(parent, child) \
332 while (0) 332 while (0)
333 333
334static inline struct device_node *of_get_child_by_name(
335 const struct device_node *node,
336 const char *name)
337{
338 return NULL;
339}
340
334static inline int of_get_child_count(const struct device_node *np) 341static inline int of_get_child_count(const struct device_node *np)
335{ 342{
336 return 0; 343 return 0;