mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/5] state: remove param member from struct state_string
@ 2020-01-23 12:20 Christian Eggers
  2020-01-23 12:20 ` [PATCH 2/5] mci: remove param_probe member from struct mci Christian Eggers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Christian Eggers @ 2020-01-23 12:20 UTC (permalink / raw)
  To: barebox; +Cc: Christian Eggers, ceggers

After adding the parameter, the pointer isn't required anymore.

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 common/state/state.h           | 1 -
 common/state/state_variables.c | 7 ++++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/state/state.h b/common/state/state.h
index 912d6d484..40450feff 100644
--- a/common/state/state.h
+++ b/common/state/state.h
@@ -191,7 +191,6 @@ struct state_mac {
  */
 struct state_string {
 	struct state_variable var;
-	struct param_d *param;
 	char *value;
 	const char *value_default;
 	char raw[];
diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index 6a00c8220..003542307 100644
--- a/common/state/state_variables.c
+++ b/common/state/state_variables.c
@@ -413,6 +413,7 @@ static struct state_variable *state_string_create(struct state *state,
 {
 	struct state_string *string;
 	uint32_t start_size[2];
+	struct param_d *param;
 	int ret;
 
 	ret = of_property_read_u32_array(node, "reg", start_size,
@@ -432,11 +433,11 @@ static struct state_variable *state_string_create(struct state *state,
 	string->var.raw = &string->raw;
 	string->var.state = state;
 
-	string->param = dev_add_param_string(&state->dev, name,
+	param = dev_add_param_string(&state->dev, name,
 					     state_string_set, state_string_get,
 					     &string->value, &string->var);
-	if (IS_ERR(string->param)) {
-		ret = PTR_ERR(string->param);
+	if (IS_ERR(param)) {
+		ret = PTR_ERR(param);
 		goto out;
 	}
 
-- 
Christian Eggers
Embedded software developer

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-27  9:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 12:20 [PATCH 1/5] state: remove param member from struct state_string Christian Eggers
2020-01-23 12:20 ` [PATCH 2/5] mci: remove param_probe member from struct mci Christian Eggers
2020-01-23 12:20 ` [PATCH 3/5] state: remove param member from state_uint32, state_enum32, state_mac Christian Eggers
2020-01-23 12:20 ` [PATCH 4/5] globalvar: Allow NULL pointers to be returned by dev_add_param() Christian Eggers
2020-01-23 12:20 ` [PATCH 5/5] parameter: Return NULL instead of ENOSYS if CONFIG_PARAMETER is disabled Christian Eggers
2020-01-27  9:58 ` [PATCH 1/5] state: remove param member from struct state_string Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox