dt: add of_alias_scan and of_alias_get_id
authorShawn Guo <shawn.guo@linaro.org>
Mon, 15 Aug 2011 07:28:14 +0000 (15:28 +0800)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 22 Sep 2011 17:12:10 +0000 (11:12 -0600)
commit611cad720148c899db5a383c1c676fd820df7023
tree780adeaa4418b7b1e76d4a3b8fe600f04475c7df
parenta81dd364de50bc1eb1519af0ecfa100753a09351
dt: add of_alias_scan and of_alias_get_id

The patch adds function of_alias_scan to populate a global lookup
table with the properties of 'aliases' node and function
of_alias_get_id for drivers to find alias id from the lookup table.

v3: Split out automatic addition of aliases on id lookup so that it can be
    debated separately from the core functionality.
v2: - Add of_chosen/of_aliases populating and of_alias_scan() invocation
    for OF_PROMTREE.
    - Add locking
    - rework parse loop

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/base.c
drivers/of/fdt.c
drivers/of/pdt.c
include/linux/of.h