From 05683764a77ff91419cabe0c26e537589b8a28ff Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 16 Oct 2018 12:15:40 -0700 Subject: 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 Signed-off-by: Sascha Hauer --- drivers/phy/phy-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/phy') 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; -- cgit v1.2.3