... and it's defined only when CONFIG_OFTREE_MEM_GENERIC is on. Signed-off-by: Holger Schurig <holgerschurig@xxxxxxxxx> --- drivers/of/base.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/of/base.c b/drivers/of/base.c index c440a69..818d76e 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -1697,6 +1697,7 @@ int of_set_property(struct device_node *np, const char *name, const void *val, i return 0; } +#ifdef CONFIG_OFTREE_MEM_GENERIC int of_add_memory(struct device_node *node, bool dump) { const char *device_type; @@ -1720,6 +1721,7 @@ int of_add_memory(struct device_node *node, bool dump) return 0; } +#endif static struct device_node *of_chosen; static const char *of_model; @@ -1739,7 +1741,9 @@ const struct of_device_id of_default_bus_match_table[] = { int of_probe(void) { +#ifdef CONFIG_OFTREE_MEM_GENERIC struct device_node *memory; +#endif if(!root_node) return -ENODEV; @@ -1750,9 +1754,11 @@ int of_probe(void) if (of_model) barebox_set_model(of_model); +#ifdef CONFIG_OFTREE_MEM_GENERIC memory = of_find_node_by_path("/memory"); if (memory) of_add_memory(memory, false); +#endif of_platform_populate(root_node, of_default_bus_match_table, NULL); of_clk_init(root_node, NULL); -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox