summaryrefslogtreecommitdiffstats
path: root/drivers/phy
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/phy
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/phy')
-rw-r--r--drivers/phy/phy-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 1b6a9f7b1d..9d6288fc07 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -46,7 +46,7 @@ struct phy *phy_create(struct device_d *dev, struct device_node *node,
id = phy_ida++;
- snprintf(phy->dev.name, MAX_DRIVER_NAME, "phy");
+ dev_set_name(&phy->dev, "phy");
phy->dev.id = id;
phy->dev.parent = dev;
phy->dev.device_node = node ?: dev->device_node;