mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree
Date: Sat, 16 May 2015 12:15:27 +0200	[thread overview]
Message-ID: <1431771327-27442-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <1431511952-32124-6-git-send-email-mkl@pengutronix.de>

of_unregister_fixup must also be called in the release function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
This depends on the patch "of: add a function to remove an of_fixup" I
just sent to the list
---
 common/state.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/common/state.c b/common/state.c
index fb13ae272db9..bd9c5a712aac 100644
--- a/common/state.c
+++ b/common/state.c
@@ -435,13 +435,6 @@ static struct state *state_new(const char *name)
 	return state;
 }
 
-void state_release(struct state *state)
-{
-	list_del(&state->list);
-	unregister_device(&state->dev);
-	free(state);
-}
-
 static struct state_variable *state_find_var(struct state *state,
 					     const char *name)
 {
@@ -760,6 +753,14 @@ static int of_state_fixup(struct device_node *root, void *ctx)
 	return ret;
 }
 
+void state_release(struct state *state)
+{
+	of_unregister_fixup(of_state_fixup, state);
+	list_del(&state->list);
+	unregister_device(&state->dev);
+	free(state);
+}
+
 /*
  * state_new_from_node - create a new state instance from a device_node
  *
-- 
2.1.4


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

  parent reply	other threads:[~2015-05-16 10:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 10:12 [PATCH 1/7] state: print name of property of size mismatch is detected Marc Kleine-Budde
2015-05-13 10:12 ` [PATCH 2/7] state: print proper error message, if reg property is not found Marc Kleine-Budde
2015-05-13 10:12 ` [PATCH 3/7] state: make state_release() non static Marc Kleine-Budde
2015-05-13 10:12 ` [PATCH 4/7] state: add functionality to export state description Marc Kleine-Budde
2015-05-13 10:12 ` [PATCH 5/7] state: backend: support phandle and of_path references Marc Kleine-Budde
2015-05-15  5:05   ` Sascha Hauer
2015-05-15  6:12     ` Marc Kleine-Budde
2015-05-13 10:12 ` [PATCH 6/7] state: add fixup to copy state from barebox to kernel device tree Marc Kleine-Budde
2015-05-15  9:28   ` Uwe Kleine-König
2015-05-16 10:15   ` Uwe Kleine-König [this message]
2015-05-18  6:07     ` [PATCH] fixup! " Sascha Hauer
2015-05-13 10:12 ` [PATCH 7/7] state: return -EPROBE_DEFER if the backend isn't available Marc Kleine-Budde
2015-05-13 12:06   ` Uwe Kleine-König
2015-05-26 11:33 [PATCH] fixup! state: add fixup to copy state from barebox to kernel device tree Marc Kleine-Budde
2015-05-26 12:22 ` 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=1431771327-27442-1-git-send-email-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=mkl@pengutronix.de \
    /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