diff options
author | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2016-05-09 16:20:42 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2016-05-16 07:29:12 -0500 |
commit | b9c43856f21d97ffdfdd642acf2eb0b52d3b1555 (patch) | |
tree | b0a3857acc8d5002b73dab6eba92afe753666cc8 /drivers/of/dynamic.c | |
parent | bb91f923d176578257aed682047653cc33148413 (diff) | |
download | linux-b9c43856f21d97ffdfdd642acf2eb0b52d3b1555.tar.gz linux-b9c43856f21d97ffdfdd642acf2eb0b52d3b1555.tar.bz2 linux-b9c43856f21d97ffdfdd642acf2eb0b52d3b1555.zip |
of: dynamic: changeset prop-update revert fix
When reverting an update property changeset entry that created a
property the reverse operation is a remove property and not an update.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/dynamic.c')
-rw-r--r-- | drivers/of/dynamic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 75ce30dfdd5f..3033fa3250dc 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -498,6 +498,11 @@ static void __of_changeset_entry_invert(struct of_changeset_entry *ce, case OF_RECONFIG_UPDATE_PROPERTY: rce->old_prop = ce->prop; rce->prop = ce->old_prop; + /* update was used but original property did not exist */ + if (!rce->prop) { + rce->action = OF_RECONFIG_REMOVE_PROPERTY; + rce->prop = ce->prop; + } break; } } |