From: Pantelis Antoniou Date: Mon, 9 May 2016 13:20:42 +0000 (+0300) Subject: of: dynamic: changeset prop-update revert fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9c43856f21d97ffdfdd642acf2eb0b52d3b1555;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Rob Herring --- 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; } }