Commit cf9d994d authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Linus Walleij

pinctrl: do not care about blank pin name

If a pin name is not specified in struct pinctrl_pin_desc,
pinctrl_register_one_pin() dynamically assigns its name.
So, desc->name is always a valid pointer here.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 4fac724f
...@@ -1367,8 +1367,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what) ...@@ -1367,8 +1367,7 @@ static int pinctrl_pins_show(struct seq_file *s, void *what)
if (desc == NULL) if (desc == NULL)
continue; continue;
seq_printf(s, "pin %d (%s) ", pin, seq_printf(s, "pin %d (%s) ", pin, desc->name);
desc->name ? desc->name : "unnamed");
/* Driver-specific info per pin */ /* Driver-specific info per pin */
if (ops->pin_dbg_show) if (ops->pin_dbg_show)
......
...@@ -258,8 +258,7 @@ void pinconf_show_setting(struct seq_file *s, ...@@ -258,8 +258,7 @@ void pinconf_show_setting(struct seq_file *s,
case PIN_MAP_TYPE_CONFIGS_PIN: case PIN_MAP_TYPE_CONFIGS_PIN:
desc = pin_desc_get(setting->pctldev, desc = pin_desc_get(setting->pctldev,
setting->data.configs.group_or_pin); setting->data.configs.group_or_pin);
seq_printf(s, "pin %s (%d)", seq_printf(s, "pin %s (%d)", desc->name,
desc->name ? desc->name : "unnamed",
setting->data.configs.group_or_pin); setting->data.configs.group_or_pin);
break; break;
case PIN_MAP_TYPE_CONFIGS_GROUP: case PIN_MAP_TYPE_CONFIGS_GROUP:
...@@ -311,8 +310,7 @@ static int pinconf_pins_show(struct seq_file *s, void *what) ...@@ -311,8 +310,7 @@ static int pinconf_pins_show(struct seq_file *s, void *what)
if (desc == NULL) if (desc == NULL)
continue; continue;
seq_printf(s, "pin %d (%s):", pin, seq_printf(s, "pin %d (%s):", pin, desc->name);
desc->name ? desc->name : "unnamed");
pinconf_dump_pin(pctldev, s, pin); pinconf_dump_pin(pctldev, s, pin);
......
...@@ -606,23 +606,17 @@ static int pinmux_pins_show(struct seq_file *s, void *what) ...@@ -606,23 +606,17 @@ static int pinmux_pins_show(struct seq_file *s, void *what)
if (pmxops->strict) { if (pmxops->strict) {
if (desc->mux_owner) if (desc->mux_owner)
seq_printf(s, "pin %d (%s): device %s%s", seq_printf(s, "pin %d (%s): device %s%s",
pin, pin, desc->name, desc->mux_owner,
desc->name ? desc->name : "unnamed",
desc->mux_owner,
is_hog ? " (HOG)" : ""); is_hog ? " (HOG)" : "");
else if (desc->gpio_owner) else if (desc->gpio_owner)
seq_printf(s, "pin %d (%s): GPIO %s", seq_printf(s, "pin %d (%s): GPIO %s",
pin, pin, desc->name, desc->gpio_owner);
desc->name ? desc->name : "unnamed",
desc->gpio_owner);
else else
seq_printf(s, "pin %d (%s): UNCLAIMED", seq_printf(s, "pin %d (%s): UNCLAIMED",
pin, pin, desc->name);
desc->name ? desc->name : "unnamed");
} else { } else {
/* For non-strict controllers */ /* For non-strict controllers */
seq_printf(s, "pin %d (%s): %s %s%s", pin, seq_printf(s, "pin %d (%s): %s %s%s", pin, desc->name,
desc->name ? desc->name : "unnamed",
desc->mux_owner ? desc->mux_owner desc->mux_owner ? desc->mux_owner
: "(MUX UNCLAIMED)", : "(MUX UNCLAIMED)",
desc->gpio_owner ? desc->gpio_owner desc->gpio_owner ? desc->gpio_owner
......
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