of: Move dynamic node fixups out of powerpc and into common code
authorGrant Likely <grant.likely@linaro.org>
Wed, 16 Jul 2014 05:25:43 +0000 (23:25 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 05:53:08 +0000 (14:53 +0900)
commit3a09bee54a7e6671b9d6040741e22d3fc0370697
tree69e908662089957423271900fa36bb5de18fc906
parent12f293f2295806bef40190774182c346a6429df3
of: Move dynamic node fixups out of powerpc and into common code

PowerPC does an odd thing with dynamic nodes. It uses a notifier to
catch new node additions and set some of the values like name and type.
This makes no sense since that same code can be put directly into
of_attach_node(). Besides, all dynamic node users need this, not just
powerpc. Fix this problem by moving the logic out of arch/powerpc and
into drivers/of/dynamic.c.

It is also important to remove this notifier because we want to move the
firing of notifiers from before the tree is modified to after so that
the receiver gets a consistent view of the tree, but that is
incompatible with notifiers that modify the node.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Nathan Fontenot <nfont@austin.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
(cherry picked from commit a25095d451ece23b1fef34474f3230100db7aa05)
Signed-off-by: Mark Brown <broonie@kernel.org>
Conflicts:
arch/powerpc/kernel/prom.c
arch/powerpc/kernel/prom.c
drivers/of/base.c
drivers/of/dynamic.c
drivers/of/of_private.h