Commit 840a97e2 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

gpio: sim: delimit the fwnode name with a ":" when generating labels

Typically, whenever a human-readable name is created for objects using
a software node, its name is delimited with ":" as dashes are often used
in other parts of the name. Make gpio-sim use the same pattern. This
results in better looking default names:

  gpio-sim.0:node0
  gpio-sim.0:node1
  gpio-sim.1:node0
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 11498d99
......@@ -421,7 +421,7 @@ static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev)
ret = fwnode_property_read_string(swnode, "gpio-sim,label", &label);
if (ret) {
label = devm_kasprintf(dev, GFP_KERNEL, "%s-%pfwP",
label = devm_kasprintf(dev, GFP_KERNEL, "%s:%pfwP",
dev_name(dev), swnode);
if (!label)
return -ENOMEM;
......@@ -836,7 +836,7 @@ static int gpio_sim_add_hogs(struct gpio_sim_device *dev)
GFP_KERNEL);
else
hog->chip_label = kasprintf(GFP_KERNEL,
"gpio-sim.%u-%pfwP",
"gpio-sim.%u:%pfwP",
dev->id,
bank->swnode);
if (!hog->chip_label) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment