summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/core.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-10-16 12:15:40 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-18 09:02:24 +0200
commit05683764a77ff91419cabe0c26e537589b8a28ff (patch)
treee51127b561984c8b612c8881b8e943c29c9daddf /drivers/mtd/core.c
parentd800b11619bb857ed857df1332c5b6e9c41d6414 (diff)
downloadbarebox-05683764a77ff91419cabe0c26e537589b8a28ff.tar.gz
barebox-05683764a77ff91419cabe0c26e537589b8a28ff.tar.xz
drivers: Introduce dev_set_name()
Introduce dev_set_name() in order to hide implementation details of setting device's name so it'd be easier to change it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/core.c')
-rw-r--r--drivers/mtd/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index 15fe9ce798..56e85b3d8f 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -607,7 +607,7 @@ int add_mtd_device(struct mtd_info *mtd, const char *devname, int device_id)
if (!devname)
devname = "mtd";
- strcpy(mtd->class_dev.name, devname);
+ dev_set_name(&mtd->class_dev, devname);
mtd->class_dev.id = device_id;
if (mtd->parent)
mtd->class_dev.parent = mtd->parent;