summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-11-09 10:55:05 +0100
commit227426f16163d3721fee82650980aae0eef01375 (patch)
treea64101906c15b814ec942468e88875ce8160e45d /common
parentc024f90f5dd5604d3f82dbbc055fd88a69d59187 (diff)
parentac7324a0ed12a67fc836b383388f2562d32e55ed (diff)
downloadbarebox-227426f16163d3721fee82650980aae0eef01375.tar.gz
barebox-227426f16163d3721fee82650980aae0eef01375.tar.xz
Merge branch 'for-next/net-switch-mv88e6xxx'
Diffstat (limited to 'common')
-rw-r--r--common/console.c4
-rw-r--r--common/state/state.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/console.c b/common/console.c
index 40c26b66d9..47ccf2e54d 100644
--- a/common/console.c
+++ b/common/console.c
@@ -314,10 +314,10 @@ int console_register(struct console_device *newcdev)
if (newcdev->devname) {
dev->id = newcdev->devid;
- strcpy(dev->name, newcdev->devname);
+ dev_set_name(dev, newcdev->devname);
} else {
dev->id = DEVICE_ID_DYNAMIC;
- strcpy(dev->name, "cs");
+ dev_set_name(dev, "cs");
}
if (newcdev->dev)
diff --git a/common/state/state.c b/common/state/state.c
index 089d8f50d5..1597197ca2 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -179,7 +179,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);