diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-10-16 12:15:40 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-10-18 09:02:24 +0200 |
commit | 05683764a77ff91419cabe0c26e537589b8a28ff (patch) | |
tree | e51127b561984c8b612c8881b8e943c29c9daddf /drivers/mtd/spi-nor | |
parent | d800b11619bb857ed857df1332c5b6e9c41d6414 (diff) | |
download | barebox-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/spi-nor')
-rw-r--r-- | drivers/mtd/spi-nor/cadence-quadspi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c index 6269668187..ed5377bd4b 100644 --- a/drivers/mtd/spi-nor/cadence-quadspi.c +++ b/drivers/mtd/spi-nor/cadence-quadspi.c @@ -1051,7 +1051,7 @@ static int cqspi_setup_flash(struct device_d *dev, if (np) { nor->dev = xzalloc(sizeof(*nor->dev)); - strcpy(nor->dev->name, np->name); + dev_set_name(nor->dev, np->name); nor->dev->device_node = np; nor->dev->id = DEVICE_ID_SINGLE; |