of: Reorder device tree changes and notifiers
authorGrant Likely <grant.likely@linaro.org>
Wed, 16 Jul 2014 18:48:23 +0000 (12:48 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 16 Feb 2015 05:53:23 +0000 (14:53 +0900)
commit3e262053f798f4d3a7549770f6bdbe2c304ea5f6
treebdc2781f4aed3639afddfa5155c18be60bba86a3
parent3a09bee54a7e6671b9d6040741e22d3fc0370697
of: Reorder device tree changes and notifiers

Currently, devicetree reconfig notifiers get emitted before the change
is applied to the tree, but that behaviour is problematic if the
receiver wants the determine the new state of the tree. The current
users don't care, but the changeset code to follow will be making
multiple changes at once. Reorder notifiers to get emitted after the
change has been applied to the tree so that callbacks see the new tree
state.

At the same time, fixup the existing callbacks to expect the new order.
There are a few callbacks that compare the old and new values of a
changed property. Put both property pointers into the of_prop_reconfig
structure.

The current notifiers also allow the notifier callback to fail and
cancel the change to the tree, but that feature isn't actually used.
It really isn't valid to ignore a tree modification provided by firmware
anyway, so remove the ability to cancel a change to the tree.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Cc: Nathan Fontenot <nfont@austin.ibm.com>
(cherry picked from commit 259092a35c7e11f1d4616b0f5b3ba7b851fe4fa6)
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/powerpc/platforms/pseries/hotplug-memory.c
drivers/crypto/nx/nx-842.c
drivers/of/base.c
drivers/of/dynamic.c
drivers/of/of_private.h
include/linux/of.h