mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
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: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
11498d9900
commit
840a97e2fb
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user