summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@arri.de>2020-01-23 13:20:41 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-01-27 10:57:42 +0100
commit4f4d6fc426a466109b7f8b20fb2fdfaad9130aa3 (patch)
tree2768b0ffdb824b26951cb66ee8deb370e34ff1a6 /common
parent70fcc51b1066d69b7042035d64e797eea5e75d6c (diff)
downloadbarebox-4f4d6fc426a466109b7f8b20fb2fdfaad9130aa3.tar.gz
state: remove param member from struct state_string
After adding the parameter, the pointer isn't required anymore. Signed-off-by: Christian Eggers <ceggers@arri.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/state/state.h1
-rw-r--r--common/state/state_variables.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/common/state/state.h b/common/state/state.h
index 912d6d4..40450fe 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 6a00c82..0035423 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;
}