summaryrefslogtreecommitdiffstats
path: root/src/barebox-state/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/barebox-state/state.c')
-rw-r--r--src/barebox-state/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c
index d5b1ddd..fd3cbbc 100644
--- a/src/barebox-state/state.c
+++ b/src/barebox-state/state.c
@@ -178,7 +178,7 @@ static struct state *state_new(const char *name)
int ret;
state = xzalloc(sizeof(*state));
- safe_strncpy(state->dev.name, name, MAX_DRIVER_NAME);
+ dev_set_name(&state->dev, name);
state->name = state->dev.name;
state->dev.id = DEVICE_ID_SINGLE;
INIT_LIST_HEAD(&state->variables);