diff options
author | Rob Herring <rob.herring@calxeda.com> | 2013-09-17 17:42:50 +0200 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2013-10-10 03:04:07 +0200 |
commit | 0c3f061c195ceb891067b6de9e4ecc347c4dea31 (patch) | |
tree | a576f97862dc34377dd55734bff47da6bb7603c7 /drivers/of | |
parent | of: implement pci_address_to_pio as weak function (diff) | |
download | linux-0c3f061c195ceb891067b6de9e4ecc347c4dea31.tar.xz linux-0c3f061c195ceb891067b6de9e4ecc347c4dea31.zip |
of: implement of_node_to_nid as a weak function
Implement of_node_to_nid as weak function to remove the dependency on
asm/prom.h. This is in preparation to make prom.h optional.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 865d3f66c86b..ced4c06d79b3 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -74,6 +74,13 @@ int of_n_size_cells(struct device_node *np) } EXPORT_SYMBOL(of_n_size_cells); +#ifdef CONFIG_NUMA +int __weak of_node_to_nid(struct device_node *np) +{ + return numa_node_id(); +} +#endif + #if defined(CONFIG_OF_DYNAMIC) /** * of_node_get - Increment refcount of a node |