From 90b109d50da09ddaa179732c01ccba7f759c125d Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Fri, 24 Jul 2020 11:05:22 -0700 Subject: [PATCH] driver core: Change delimiter in devlink device's name to "--" The devlink device name is of the form "supplier:consumer". But ":" is fairly common in device names and makes it visually hard to distinguish supplier and consumer. So, replace it with "--" to make it easier. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200724180523.1393383-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman --- Documentation/ABI/testing/sysfs-class-devlink | 2 +- drivers/base/core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-devlink b/Documentation/ABI/testing/sysfs-class-devlink index 3a24973abb835..64791b65c9a38 100644 --- a/Documentation/ABI/testing/sysfs-class-devlink +++ b/Documentation/ABI/testing/sysfs-class-devlink @@ -4,7 +4,7 @@ Contact: Saravana Kannan Description: Provide a place in sysfs for the device link objects in the kernel at any given time. The name of a device link directory, - denoted as ... above, is of the form : + denoted as ... above, is of the form -- where is the supplier device name and is the consumer device name. diff --git a/drivers/base/core.c b/drivers/base/core.c index b6e8b0bb76e42..4d05868d9356b 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -623,7 +623,7 @@ struct device_link *device_link_add(struct device *consumer, link->link_dev.class = &devlink_class; device_set_pm_not_required(&link->link_dev); - dev_set_name(&link->link_dev, "%s:%s", + dev_set_name(&link->link_dev, "%s--%s", dev_name(supplier), dev_name(consumer)); if (device_register(&link->link_dev)) { put_device(consumer); -- 2.50.1