pinctrl: Don't copy pin names when registering them
A pin controller's names array is no longer marked __refdata. Hence, we
can avoid copying a pin's name into the descriptor when registering it.
Instead, just point at the string supplied in the pin array.
This both simplifies and speeds up pin controller initialization, but
also removes the hard-coded maximum pin name length.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index ceb6327..423522d 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -164,9 +164,8 @@
/* Set owner */
pindesc->pctldev = pctldev;
- /* Copy optional basic pin info */
- if (name)
- strlcpy(pindesc->name, name, sizeof(pindesc->name));
+ /* Copy basic pin info */
+ pindesc->name = name;
spin_lock(&pctldev->pin_desc_tree_lock);
radix_tree_insert(&pctldev->pin_desc_tree, number, pindesc);