pinctrl: pinmux: open-code PINCTRL_FUNCTION_DESC()

This macro is only used in one place and pin function descriptors should
only be created by pinmux core so there's no point in exposing it to
other pinctrl users. Remove the macro and hand-code its functionality.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/20250709-pinctrl-gpio-pinfuncs-v2-1-b6135149c0d9@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Bartosz Golaszewski 2025-07-09 16:38:57 +02:00 committed by Linus Walleij
parent 63149542dc
commit dd47155a0e
2 changed files with 2 additions and 8 deletions

View File

@ -891,7 +891,8 @@ int pinmux_generic_add_function(struct pinctrl_dev *pctldev,
if (!function)
return -ENOMEM;
*function = PINCTRL_FUNCTION_DESC(name, groups, ngroups, data);
function->func = PINCTRL_PINFUNCTION(name, groups, ngroups);
function->data = data;
error = radix_tree_insert(&pctldev->pin_function_tree, selector, function);
if (error)

View File

@ -141,13 +141,6 @@ struct function_desc {
void *data;
};
/* Convenient macro to define a generic pin function descriptor */
#define PINCTRL_FUNCTION_DESC(_name, _grps, _num_grps, _data) \
(struct function_desc) { \
.func = PINCTRL_PINFUNCTION(_name, _grps, _num_grps), \
.data = _data, \
}
int pinmux_generic_get_function_count(struct pinctrl_dev *pctldev);
const char *