Skip to content

Commit

Permalink
of: add stub of_get_child_by_name for non-OF builds
Browse files Browse the repository at this point in the history
Fixes build error on s3c6400_defconfig, introduced by commit
06455bb, "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 <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
olofj authored and Rob Herring committed Oct 17, 2012
1 parent ddffeb8 commit 25c040c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ static inline bool of_have_populated_dt(void)
#define for_each_child_of_node(parent, child) \
while (0)

static inline struct device_node *of_get_child_by_name(
const struct device_node *node,
const char *name)
{
return NULL;
}

static inline int of_get_child_count(const struct device_node *np)
{
return 0;
Expand Down

0 comments on commit 25c040c

Please sign in to comment.