of: Make of_find_node_by_path() handle /aliases
authorGrant Likely <grant.likely@linaro.org>
Fri, 14 Mar 2014 17:07:12 +0000 (17:07 +0000)
committerGrant Likely <grant.likely@linaro.org>
Fri, 23 May 2014 02:35:06 +0000 (11:35 +0900)
commitc22e650e66b862babe9c00bebb20b8029c7b0362
tree21c0c5115af3cb4cec650b818d1ec03839a0fe0b
parent0d0e02d605c5696a5076510f564fefe659127aa4
of: Make of_find_node_by_path() handle /aliases

Make of_find_node_by_path() handle aliases as prefixes. To make this
work the name search is refactored to search by path component instead
of by full string. This should be a more efficient search, and it makes
it possible to start a search at a subnode of a tree.

Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
[grant.likely: Rework to not require allocating at runtime]
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/base.c