mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Teresa Remmet <t.remmet@phytec.de>
To: barebox@lists.infradead.org
Subject: [PATCH for next] fixup! common: oftree: Add fuction to register set status fixup
Date: Fri, 26 Feb 2016 09:56:50 +0100	[thread overview]
Message-ID: <1456477010-15629-1-git-send-email-t.remmet@phytec.de> (raw)

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 common/oftree.c | 10 +++++-----
 include/of.h    |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/common/oftree.c b/common/oftree.c
index 3103bb1..e98b908 100644
--- a/common/oftree.c
+++ b/common/oftree.c
@@ -140,16 +140,16 @@ static int of_register_bootargs_fixup(void)
 late_initcall(of_register_bootargs_fixup);
 
 struct of_fixup_status_data {
-	char *node;
+	const char *path;
 	bool status;
 };
 
 static int of_fixup_status(struct device_node *root, void *context)
 {
-	struct of_fixup_status_data *data = context;
+	const struct of_fixup_status_data *data = context;
 	struct device_node *node;
 
-	node = of_find_node_by_path_or_alias(root, data->node);
+	node = of_find_node_by_path_or_alias(root, data->path);
 	if (!node)
 		return -ENODEV;
 
@@ -164,12 +164,12 @@ static int of_fixup_status(struct device_node *root, void *context)
  * Register a fixup to enable or disable a node in the devicet tree by
  * passing the path or alias.
  */
-int of_register_set_status_fixup(char *node, bool status)
+int of_register_set_status_fixup(const char *path, bool status)
 {
 	struct of_fixup_status_data *data;
 
 	data = xzalloc(sizeof(*data));
-	data->node = node;
+	data->path = path;
 	data->status = status;
 
 	return of_register_fixup(of_fixup_status, (void *)data);
diff --git a/include/of.h b/include/of.h
index ae65409..8c8f57a 100644
--- a/include/of.h
+++ b/include/of.h
@@ -249,7 +249,7 @@ int of_find_path(struct device_node *node, const char *propname, char **outpath,
 int of_find_path_by_node(struct device_node *node, char **outpath, unsigned flags);
 int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context);
 int of_unregister_fixup(int (*fixup)(struct device_node *, void *), void *context);
-int of_register_set_status_fixup(char *node, bool status);
+int of_register_set_status_fixup(const char *node, bool status);
 struct device_node *of_find_node_by_alias(struct device_node *root,
 		const char *alias);
 struct device_node *of_find_node_by_path_or_alias(struct device_node *root,
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-02-26  8:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  8:56 Teresa Remmet [this message]
2016-02-29  6:43 ` Sascha Hauer
2016-02-29  8:19   ` Uwe Kleine-König
2016-03-01  7:26     ` Sascha Hauer

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=1456477010-15629-1-git-send-email-t.remmet@phytec.de \
    --to=t.remmet@phytec.de \
    --cc=barebox@lists.infradead.org \
    /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