From: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
To: Rob Herring <robherring2@gmail.com>
Cc: Frank Rowand <frowand.list@gmail.com>,
Matt Porter <mporter@konsulko.com>,
Koen Kooi <koen@dominion.thruhere.net>,
Guenter Roeck <linux@roeck-us.net>, Marek Vasut <marex@denx.de>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
Pantelis Antoniou <panto@antoniou-consulting.com>
Subject: [PATCH 1/4] of: dynamic: changeset prop-update revert fix
Date: Mon, 9 May 2016 16:20:42 +0300 [thread overview]
Message-ID: <1462800045-10943-2-git-send-email-pantelis.antoniou@konsulko.com> (raw)
In-Reply-To: <1462800045-10943-1-git-send-email-pantelis.antoniou@konsulko.com>
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>
---
drivers/of/dynamic.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index c647bd1..4145b44 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -497,6 +497,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;
}
}
--
1.7.12
next prev parent reply other threads:[~2016-05-09 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 13:20 [PATCH 0/4] of: dynamic: Changesets helpers & fixes Pantelis Antoniou
2016-05-09 13:20 ` Pantelis Antoniou [this message]
2016-05-16 14:08 ` [PATCH 1/4] of: dynamic: changeset prop-update revert fix Rob Herring
2016-05-09 13:20 ` [PATCH 2/4] of: dynamic: Add __of_node_dupv() Pantelis Antoniou
2016-05-09 13:20 ` [PATCH 3/4] of: changesets: Introduce changeset helper methods Pantelis Antoniou
2016-05-09 14:27 ` Rob Herring
2016-05-09 14:34 ` Pantelis Antoniou
2016-05-09 15:08 ` Rob Herring
2016-05-09 13:20 ` [PATCH 4/4] of: unittest: changeset helpers Pantelis Antoniou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1462800045-10943-2-git-send-email-pantelis.antoniou@konsulko.com \
--to=pantelis.antoniou@konsulko.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=koen@dominion.thruhere.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=marex@denx.de \
--cc=mporter@konsulko.com \
--cc=panto@antoniou-consulting.com \
--cc=robherring2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®